[fix](trx-frontend): hide signal visuals for non-sdr
Hide the combined waterfall and spectrum block when filter controls are unavailable so non-SDR rigs do not show those visuals. Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -82,9 +82,9 @@ function showAuthGate(allowGuest = false) {
|
|||||||
authGate.style.flexDirection = "column";
|
authGate.style.flexDirection = "column";
|
||||||
authGate.style.justifyContent = "center";
|
authGate.style.justifyContent = "center";
|
||||||
authGate.style.alignItems = "stretch";
|
authGate.style.alignItems = "stretch";
|
||||||
const overviewStrip = document.querySelector(".overview-strip");
|
const signalVisualBlock = document.querySelector(".signal-visual-block");
|
||||||
if (overviewStrip) {
|
if (signalVisualBlock) {
|
||||||
overviewStrip.style.display = "none";
|
signalVisualBlock.style.display = "none";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide all tab panels
|
// Hide all tab panels
|
||||||
@@ -108,9 +108,9 @@ function hideAuthGate() {
|
|||||||
const authGate = document.getElementById("auth-gate");
|
const authGate = document.getElementById("auth-gate");
|
||||||
authGate.style.display = "none";
|
authGate.style.display = "none";
|
||||||
document.getElementById("loading").style.display = "block";
|
document.getElementById("loading").style.display = "block";
|
||||||
const overviewStrip = document.querySelector(".overview-strip");
|
const signalVisualBlock = document.querySelector(".signal-visual-block");
|
||||||
if (overviewStrip) {
|
if (signalVisualBlock) {
|
||||||
overviewStrip.style.display = "";
|
signalVisualBlock.style.display = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show Main tab by default and hide all other tabs
|
// Show Main tab by default and hide all other tabs
|
||||||
@@ -277,8 +277,12 @@ function applyCapabilities(caps) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Spectrum panel (SDR-only)
|
// Spectrum panel (SDR-only)
|
||||||
|
const signalVisualBlock = document.querySelector(".signal-visual-block");
|
||||||
const spectrumPanel = document.getElementById("spectrum-panel");
|
const spectrumPanel = document.getElementById("spectrum-panel");
|
||||||
const centerFreqField = document.getElementById("center-freq-field");
|
const centerFreqField = document.getElementById("center-freq-field");
|
||||||
|
if (signalVisualBlock) {
|
||||||
|
signalVisualBlock.style.display = caps.filter_controls ? "" : "none";
|
||||||
|
}
|
||||||
if (spectrumPanel) {
|
if (spectrumPanel) {
|
||||||
if (caps.filter_controls) {
|
if (caps.filter_controls) {
|
||||||
spectrumPanel.style.display = "";
|
spectrumPanel.style.display = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user