add ota update channels

This commit is contained in:
Hay1tsme
2025-09-27 16:17:44 -04:00
parent 10d38e14ae
commit 2d84865155
5 changed files with 97 additions and 25 deletions

View File

@@ -3,13 +3,9 @@
<script type="text/javascript">
function swap_ota() {
let is_cab = document.getElementById("is_cab").checked;
let cbx_ota = document.getElementById("is_ota");
let txt_ota = document.getElementById("ota_channel");
cbx_ota.disabled = !is_cab;
if (cbx_ota.disabled) {
cbx_ota.checked = false;
}
}
</script>
<h1>Machine: {{machine.serial}}</h1>
@@ -64,8 +60,8 @@ Info
<label for="is_cab" class="form-label">Real Cabinet</label>
</div>
<div class="col mb-3">
<input type="checkbox" class="form-control-check" id="is_ota" name="is_ota" {{ 'checked' if machine.ota_enable else ''}}>
<label for="is_ota" class="form-label">Allow OTA updates</label>
<input type="text" class="form-control-check" id="ota_channel" name="ota_channel" value={{ machine.ota_channel }} {{ 'disabled' if not machine.is_cab else '' }}>
<label for="ota_channel" class="form-label">OTA Update Channel</label>
</div>
<div class="col mb-3">
</div>