[fix](trx-frontend-http): hide TX audio controls on RX-only rigs

Signed-off-by: Stan Grams <sjg@haxx.space>
Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
2026-02-27 23:03:46 +01:00
parent 5730ce2991
commit bc206e8f6b
@@ -239,8 +239,16 @@ function applyCapabilities(caps) {
// PTT / TX controls // PTT / TX controls
const pttBtn = document.getElementById("ptt-btn"); const pttBtn = document.getElementById("ptt-btn");
const txMetersRow = document.getElementById("tx-meters"); const txMetersRow = document.getElementById("tx-meters");
const txAudioBtn = document.getElementById("tx-audio-btn");
const txVolSlider = document.getElementById("tx-vol");
const txVolControl = txVolSlider ? txVolSlider.closest(".vol-label") : null;
if (pttBtn) pttBtn.style.display = caps.tx ? "" : "none"; if (pttBtn) pttBtn.style.display = caps.tx ? "" : "none";
if (txMetersRow) txMetersRow.style.display = caps.tx ? "" : "none"; if (txMetersRow) txMetersRow.style.display = caps.tx ? "" : "none";
if (txAudioBtn) txAudioBtn.style.display = caps.tx ? "" : "none";
if (txVolControl) txVolControl.style.display = caps.tx ? "" : "none";
if (!caps.tx && typeof stopTxAudio === "function" && txActive) {
stopTxAudio();
}
// TX limit row // TX limit row
const txLimitRow = document.getElementById("tx-limit-row"); const txLimitRow = document.getElementById("tx-limit-row");