From 2bdc23400abaf065815cb46fed6708647d76d11f Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Fri, 27 Feb 2026 00:26:57 +0100 Subject: [PATCH] [fix](trx-frontend-http): hide rig picker when auth is required Hide the header rig picker when showing the authentication gate, since no rigs are accessible until the user authenticates. Show the picker again when auth gate is hidden (after login). This improves UX by not showing an empty picker to unauthenticated users. Co-Authored-By: Claude Haiku 4.5 Signed-off-by: Stan Grams --- .../trx-frontend/trx-frontend-http/assets/web/app.js | 12 ++++++++++++ 1 file changed, 12 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 0f3b48b..5048380 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 @@ -80,6 +80,12 @@ function showAuthGate(allowGuest = false) { document.getElementById("auth-gate").style.display = "block"; document.getElementById("tab-bar").style.display = "none"; + // Hide rig picker since no rigs are accessible without auth + const rigSwitch = document.querySelector(".header-rig-switch"); + if (rigSwitch) { + rigSwitch.style.display = "none"; + } + // Hide all tab panels document.querySelectorAll(".tab-panel").forEach(panel => { panel.style.display = "none"; @@ -97,6 +103,12 @@ function hideAuthGate() { document.getElementById("loading").style.display = "block"; document.getElementById("tab-bar").style.display = ""; + // Show rig picker again now that user is authenticated + const rigSwitch = document.querySelector(".header-rig-switch"); + if (rigSwitch) { + rigSwitch.style.display = ""; + } + // Show Main tab by default and hide all other tabs document.querySelectorAll(".tab-panel").forEach(panel => { panel.style.display = "none";