[feat](trx-rs): show live wfm stereo detect state
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -1265,6 +1265,12 @@ function render(update) {
|
||||
wfmDenoiseBtn.style.borderColor = on ? "" : "var(--accent-warn, #f0a500)";
|
||||
wfmDenoiseBtn.style.color = on ? "" : "var(--accent-warn, #f0a500)";
|
||||
}
|
||||
if (wfmStFlagEl && typeof update.filter.wfm_stereo_detected === "boolean") {
|
||||
const detected = update.filter.wfm_stereo_detected;
|
||||
wfmStFlagEl.textContent = detected ? "ST" : "MO";
|
||||
wfmStFlagEl.classList.toggle("wfm-st-flag-stereo", detected);
|
||||
wfmStFlagEl.classList.toggle("wfm-st-flag-mono", !detected);
|
||||
}
|
||||
}
|
||||
if (update.status && update.status.freq && typeof update.status.freq.hz === "number") {
|
||||
applyLocalTunedFrequency(update.status.freq.hz, true);
|
||||
@@ -2559,6 +2565,7 @@ const audioRow = document.getElementById("audio-row");
|
||||
const wfmControlsCol = document.getElementById("wfm-controls-col");
|
||||
const wfmDeemphasisEl = document.getElementById("wfm-deemphasis");
|
||||
const wfmAudioModeEl = document.getElementById("wfm-audio-mode");
|
||||
const wfmStFlagEl = document.getElementById("wfm-st-flag");
|
||||
const wfmDenoiseBtn = document.getElementById("wfm-denoise-btn");
|
||||
|
||||
// Hide audio row if audio is not configured on the server
|
||||
|
||||
@@ -165,6 +165,9 @@
|
||||
<option value="mono">Mono</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="wfm-control wfm-st-flag-wrap" aria-label="Stereo pilot status">
|
||||
<span id="wfm-st-flag" class="wfm-st-flag wfm-st-flag-mono">MO</span>
|
||||
</label>
|
||||
<label class="wfm-control">Denoise
|
||||
<button id="wfm-denoise-btn" type="button" class="status-input toggle-btn toggle-on">On</button>
|
||||
</label>
|
||||
|
||||
@@ -192,6 +192,34 @@ input.status-input, select.status-input { width: 100%; padding: 0.45rem 0.5rem;
|
||||
line-height: 1.2;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.wfm-st-flag-wrap {
|
||||
min-width: 0;
|
||||
}
|
||||
.wfm-st-flag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 2.35rem;
|
||||
padding: 0.45rem 0.5rem;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid var(--border-light);
|
||||
border-radius: 6px;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 800;
|
||||
line-height: 1.2;
|
||||
letter-spacing: 0.04em;
|
||||
background: var(--input-bg);
|
||||
}
|
||||
.wfm-st-flag-stereo {
|
||||
color: #ff5c5c;
|
||||
border-color: color-mix(in srgb, #ff5c5c 65%, var(--border-light));
|
||||
background: color-mix(in srgb, #ff5c5c 14%, var(--input-bg));
|
||||
}
|
||||
.wfm-st-flag-mono {
|
||||
color: var(--text-muted);
|
||||
border-color: var(--border-light);
|
||||
background: color-mix(in srgb, var(--input-bg) 92%, var(--panel-2));
|
||||
}
|
||||
.controls-col-center::after {
|
||||
content: "";
|
||||
display: block;
|
||||
|
||||
Reference in New Issue
Block a user