[fix](trx-frontend-http): hide rig selector when logged out
Keep the top bar visible for unauthenticated users, but\nhide the rig selector until a session is established.\n\nCo-authored-by: Codex <codex@openai.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -330,6 +330,7 @@ let overviewPeakHoldMs = Number(loadSetting("overviewPeakHoldMs", 2000));
|
||||
function syncTopBarAccess() {
|
||||
const loggedOut = authEnabled && !authRole;
|
||||
const tabBar = document.getElementById("tab-bar");
|
||||
const rigSwitch = document.querySelector(".header-rig-switch");
|
||||
if (tabBar) tabBar.style.display = "";
|
||||
|
||||
document.querySelectorAll(".tab-bar .tab").forEach((btn) => {
|
||||
@@ -338,6 +339,10 @@ function syncTopBarAccess() {
|
||||
btn.disabled = false;
|
||||
});
|
||||
|
||||
if (rigSwitch) {
|
||||
rigSwitch.style.display = loggedOut ? "none" : "";
|
||||
}
|
||||
|
||||
if (headerRigSwitchSelect) {
|
||||
headerRigSwitchSelect.disabled = loggedOut || authRole === "rx" || lastRigIds.length === 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user