[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 <noreply@anthropic.com> Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user