[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:
2026-03-01 13:41:13 +01:00
parent 64bb9a0d42
commit 441cdd3adb
2 changed files with 11 additions and 7 deletions
@@ -1374,9 +1374,10 @@ function render(update) {
}
}
if (wfmDenoiseEl && typeof update.filter.wfm_denoise === "boolean") {
if (wfmDenoiseEl.checked !== update.filter.wfm_denoise) {
wfmDenoiseEl.checked = update.filter.wfm_denoise;
saveSetting("wfmDenoise", update.filter.wfm_denoise ? "true" : "false");
const nextDenoise = update.filter.wfm_denoise ? "on" : "off";
if (wfmDenoiseEl.value !== nextDenoise) {
wfmDenoiseEl.value = nextDenoise;
saveSetting("wfmDenoise", nextDenoise);
}
}
if (wfmStFlagEl && typeof update.filter.wfm_stereo_detected === "boolean") {
@@ -2756,10 +2757,10 @@ if (wfmAudioModeEl) {
});
}
if (wfmDenoiseEl) {
wfmDenoiseEl.checked = loadSetting("wfmDenoise", "true") === "true";
wfmDenoiseEl.value = loadSetting("wfmDenoise", "on");
wfmDenoiseEl.addEventListener("change", () => {
const enabled = wfmDenoiseEl.checked;
saveSetting("wfmDenoise", enabled ? "true" : "false");
saveSetting("wfmDenoise", wfmDenoiseEl.value);
const enabled = wfmDenoiseEl.value !== "off";
postPath(`/set_wfm_denoise?enabled=${enabled ? "true" : "false"}`).catch(() => {});
});
}
@@ -174,7 +174,10 @@
</label>
<label class="wfm-control">
<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>
<div class="wfm-gain-group" id="sdr-gain-controls">
<label class="wfm-control">