From 046d0a33af3facc56d71e497bd4ec360345181f8 Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Tue, 3 Mar 2026 22:41:39 +0100 Subject: [PATCH] [fix](trx-frontend): gate cw status by rig mode Co-authored-by: OpenAI Codex Signed-off-by: Stan Grams --- .../trx-frontend/trx-frontend-http/assets/web/app.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js index 0e27f74..3d6d808 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js @@ -2201,9 +2201,12 @@ function render(update) { ); if (window.updateAprsBar) window.updateAprsBar(); if (window.updateFt8Bar) window.updateFt8Bar(); - if (cwStatus && modeUpper !== "CW" && modeUpper !== "CWR" && cwStatus.textContent === "Receiving") { - cwStatus.textContent = "Connected, listening for packets"; - } + setModeBoundDecodeStatus( + cwStatus, + ["CW", "CWR"], + "Select CW mode to decode", + "Connected, listening for CW", + ); const ft8Enabled = !!update.ft8_decode_enabled; if (ft8Status && (!ft8Enabled || (modeUpper !== "DIG" && modeUpper !== "USB")) && ft8Status.textContent === "Receiving") { ft8Status.textContent = "Connected, listening for packets"; @@ -5096,7 +5099,8 @@ function updateDecodeStatus(text) { const vdesText = text === "Connected, listening for packets" ? "Connected, listening for bursts" : text; setModeBoundDecodeStatus(vdes, ["VDES", "MARINE"], "Select VDES mode to decode", vdesText); setModeBoundDecodeStatus(aprs, ["PKT"], "Select PKT mode to decode", text); - if (cw && cw.textContent !== "Receiving") cw.textContent = text; + const cwText = text === "Connected, listening for packets" ? "Connected, listening for CW" : text; + setModeBoundDecodeStatus(cw, ["CW", "CWR"], "Select CW mode to decode", cwText); if (ft8 && ft8.textContent !== "Receiving") ft8.textContent = text; } function connectDecode() {