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