[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 <noreply@anthropic.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user