From 26fbd37b6d2d19454ce2a2a0c8bfe600852088dd Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Sun, 8 Mar 2026 20:43:55 +0100 Subject: [PATCH] [feat](trx-frontend-http): wire HF APRS toggle button and bookmark decoder - Add "Enable HF APRS" toggle button to the HF APRS tab (same style as FT8/WSPR); button is disabled during TX like other decoder toggles - app.js: sync button text/colour from SSE state updates - hf-aprs.js: connect button click to /toggle_hf_aprs_decode - bookmarks.js: add "HF APRS" checkbox to Add/Edit Bookmark decoder section; bmReadDecoders/bmWriteDecoders handle "hf-aprs" key; bmApply toggles the decoder to match bookmark preference on recall Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Stan Grams --- .../trx-frontend/trx-frontend-http/assets/web/app.js | 8 ++++++++ .../trx-frontend/trx-frontend-http/assets/web/index.html | 2 ++ .../trx-frontend-http/assets/web/plugins/bookmarks.js | 6 ++++++ .../trx-frontend-http/assets/web/plugins/hf-aprs.js | 4 ++++ 4 files changed, 20 insertions(+) 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 b421d20..00bb0cf 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 @@ -222,6 +222,7 @@ function applyAuthRestrictions() { "vdes-clear-btn", "ft8-decode-toggle-btn", "wspr-decode-toggle-btn", + "hf-aprs-decode-toggle-btn", "cw-auto", "aprs-clear-btn", "ft8-clear-btn", @@ -2476,6 +2477,13 @@ function render(update) { wsprToggleBtn.style.borderColor = wsprOn ? "#00d17f" : ""; wsprToggleBtn.style.color = wsprOn ? "#00d17f" : ""; } + const hfAprsToggleBtn = document.getElementById("hf-aprs-decode-toggle-btn"); + if (hfAprsToggleBtn) { + const hfAprsOn = !!update.hf_aprs_decode_enabled; + hfAprsToggleBtn.textContent = hfAprsOn ? "Disable HF APRS" : "Enable HF APRS"; + hfAprsToggleBtn.style.borderColor = hfAprsOn ? "#00d17f" : ""; + hfAprsToggleBtn.style.color = hfAprsOn ? "#00d17f" : ""; + } const cwAutoEl = document.getElementById("cw-auto"); const cwWpmEl = document.getElementById("cw-wpm"); const cwToneEl = document.getElementById("cw-tone"); diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html index b979e9c..38ffb1f 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html @@ -336,6 +336,7 @@
+