From 0f9f00c441f0f55d9c94449271d791ac33f3d9d8 Mon Sep 17 00:00:00 2001 From: Stanislaw Grams Date: Fri, 13 Feb 2026 08:58:10 +0100 Subject: [PATCH] [fix](trx-frontend-http): show Main tab by default after login After logging in, automatically show the Main tab-panel and mark the Main tab button as active. Previously, users had to click the Main tab to see content after login. hideAuthGate() now: - Shows the Main tab-panel - Hides all other tab-panels - Marks the Main tab button as active Co-Authored-By: Claude Opus 4.6 Signed-off-by: Stanislaw Grams --- .../trx-frontend-http/assets/web/app.js | 18 ++++++++++++++++++ 1 file changed, 18 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 4aedb24..523e13b 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 @@ -87,6 +87,24 @@ function hideAuthGate() { document.getElementById("auth-gate").style.display = "none"; document.getElementById("loading").style.display = "block"; document.getElementById("tab-bar").style.display = ""; + + // Show Main tab by default and hide all other tabs + document.querySelectorAll(".tab-panel").forEach(panel => { + panel.style.display = "none"; + }); + const mainTab = document.getElementById("tab-main"); + if (mainTab) { + mainTab.style.display = ""; + } + + // Mark Main tab button as active + document.querySelectorAll(".tab-bar .tab").forEach(btn => { + btn.classList.remove("active"); + }); + const mainTabBtn = document.querySelector(".tab-bar .tab[data-tab='main']"); + if (mainTabBtn) { + mainTabBtn.classList.add("active"); + } } function showAuthError(msg) {