[style](trx-frontend): use select element for WFM denoise control
Replace the checkbox with an On/Off select dropdown to match the styling of the other WFM controls (Deemp, Audio) in the controls row. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -1374,9 +1374,10 @@ function render(update) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (wfmDenoiseEl && typeof update.filter.wfm_denoise === "boolean") {
|
if (wfmDenoiseEl && typeof update.filter.wfm_denoise === "boolean") {
|
||||||
if (wfmDenoiseEl.checked !== update.filter.wfm_denoise) {
|
const nextDenoise = update.filter.wfm_denoise ? "on" : "off";
|
||||||
wfmDenoiseEl.checked = update.filter.wfm_denoise;
|
if (wfmDenoiseEl.value !== nextDenoise) {
|
||||||
saveSetting("wfmDenoise", update.filter.wfm_denoise ? "true" : "false");
|
wfmDenoiseEl.value = nextDenoise;
|
||||||
|
saveSetting("wfmDenoise", nextDenoise);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (wfmStFlagEl && typeof update.filter.wfm_stereo_detected === "boolean") {
|
if (wfmStFlagEl && typeof update.filter.wfm_stereo_detected === "boolean") {
|
||||||
@@ -2756,10 +2757,10 @@ if (wfmAudioModeEl) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (wfmDenoiseEl) {
|
if (wfmDenoiseEl) {
|
||||||
wfmDenoiseEl.checked = loadSetting("wfmDenoise", "true") === "true";
|
wfmDenoiseEl.value = loadSetting("wfmDenoise", "on");
|
||||||
wfmDenoiseEl.addEventListener("change", () => {
|
wfmDenoiseEl.addEventListener("change", () => {
|
||||||
const enabled = wfmDenoiseEl.checked;
|
saveSetting("wfmDenoise", wfmDenoiseEl.value);
|
||||||
saveSetting("wfmDenoise", enabled ? "true" : "false");
|
const enabled = wfmDenoiseEl.value !== "off";
|
||||||
postPath(`/set_wfm_denoise?enabled=${enabled ? "true" : "false"}`).catch(() => {});
|
postPath(`/set_wfm_denoise?enabled=${enabled ? "true" : "false"}`).catch(() => {});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,7 +174,10 @@
|
|||||||
</label>
|
</label>
|
||||||
<label class="wfm-control">
|
<label class="wfm-control">
|
||||||
<span class="wfm-control-label">Denoise</span>
|
<span class="wfm-control-label">Denoise</span>
|
||||||
<input type="checkbox" id="wfm-denoise" checked />
|
<select id="wfm-denoise" class="status-input">
|
||||||
|
<option value="on">On</option>
|
||||||
|
<option value="off">Off</option>
|
||||||
|
</select>
|
||||||
</label>
|
</label>
|
||||||
<div class="wfm-gain-group" id="sdr-gain-controls">
|
<div class="wfm-gain-group" id="sdr-gain-controls">
|
||||||
<label class="wfm-control">
|
<label class="wfm-control">
|
||||||
|
|||||||
Reference in New Issue
Block a user