indentation
This commit is contained in:
parent
37637be2cd
commit
1b609627dc
|
@ -285,34 +285,34 @@
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
document.querySelectorAll('div.radios input').forEach((radio) =>
|
document.querySelectorAll('div.radios input').forEach((radio) =>
|
||||||
radio.addEventListener("change", () => {
|
radio.addEventListener("change", () => {
|
||||||
const button = document.querySelector("esp-web-install-button");
|
const button = document.querySelector("esp-web-install-button");
|
||||||
var protocol = document.querySelector('input[name="protocol"]:checked').value;
|
var protocol = document.querySelector('input[name="protocol"]:checked').value;
|
||||||
var hardware = document.querySelector('input[name="hardware"]:checked').value;
|
var hardware = document.querySelector('input[name="hardware"]:checked').value;
|
||||||
|
|
||||||
if(protocol === "dry_contact"){
|
if(protocol === "dry_contact"){
|
||||||
alert("Dry contact support is coming soon.");
|
alert("Dry contact support is coming soon.");
|
||||||
document.querySelector('input[name="protocol"][value="secplusv2"]').checked = true;
|
document.querySelector('input[name="protocol"][value="secplusv2"]').checked = true;
|
||||||
return;
|
return;
|
||||||
document.querySelector("#wiring_diagram").src = "wiring_diagrams/dry_contact_diagram.png";
|
document.querySelector("#wiring_diagram").src = "wiring_diagrams/dry_contact_diagram.png";
|
||||||
}else{
|
}else{
|
||||||
document.querySelector("#wiring_diagram").src = "wiring_diagrams/secplus_diagram.png";
|
document.querySelector("#wiring_diagram").src = "wiring_diagrams/secplus_diagram.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(protocol !== "sec2" && hardware === "v2.0"){
|
if(protocol !== "sec2" && hardware === "v2.0"){
|
||||||
alert("ratgdo version 2.0 only works with Security + 2.0");
|
alert("ratgdo version 2.0 only works with Security + 2.0");
|
||||||
document.querySelector('input[name="protocol"][value="secplusv2"]').checked = true;
|
document.querySelector('input[name="protocol"][value="secplusv2"]').checked = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(protocol === "secplusv2"){
|
if(protocol === "secplusv2"){
|
||||||
protocol = "";
|
protocol = "";
|
||||||
}else{
|
}else{
|
||||||
protocol = `_${protocol}`;
|
protocol = `_${protocol}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
button.manifest = `${hardware}${protocol}-manifest.json`;
|
button.manifest = `${hardware}${protocol}-manifest.json`;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
document
|
document
|
||||||
|
|
Loading…
Reference in New Issue