[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.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(() => {});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user