feat: fixed ROI zone mode as default selection

- index.html: checked moves from dynamic to fixed radio; preset config
  visible on load (was only added on change event)
- app.js: when no zone presets exist, fall back to dynamic radio + hide
  preset config (server already falls back to dynamic)
This commit is contained in:
jetson committed 2026-09-29 16:54:18 +07:00
1 parent 81e6ae6624
commit f2b564446f
2 files changed
+9 -4

No files matched your search

+6 -1
View File
@@ -288,7 +288,12 @@
.then(function (presets) {
if (!presets || presets.length === 0) {
var fixedRadio = zoneSection.querySelector('input[value="fixed"]');
if (fixedRadio) fixedRadio.closest('label').style.display = 'none';
if (fixedRadio) {
fixedRadio.closest('label').style.display = 'none';
var dynamicRadio = zoneSection.querySelector('input[value="dynamic"]');
if (dynamicRadio) dynamicRadio.checked = true;
}
if (zoneFixedConfig) zoneFixedConfig.classList.remove('visible');
return;
}
zonePresetSelect.innerHTML = '';
+3 -3
View File
@@ -410,11 +410,11 @@
<h3>Counting Zone</h3>
<div class="zone-radio-group">
<label>
<input type="radio" name="zone_mode" value="dynamic" checked>
<input type="radio" name="zone_mode" value="dynamic">
Auto-detect Truck
</label>
<label>
<input type="radio" name="zone_mode" value="fixed">
<input type="radio" name="zone_mode" value="fixed" checked>
Fixed Zone
</label>
<label>
@@ -422,7 +422,7 @@
Auto-detect + Freeze
</label>
</div>
<div class="zone-fixed-config" id="zone-fixed-config">
<div class="zone-fixed-config visible" id="zone-fixed-config">
<div class="zone-preset-row">
<label for="zone-preset-select">Preset:</label>
<select name="zone_preset" id="zone-preset-select">