From 00f82646c28be9ad1cc7e1c939d51aac0f8e9e21 Mon Sep 17 00:00:00 2001 From: Stanislaw Grams Date: Fri, 13 Feb 2026 08:51:49 +0100 Subject: [PATCH] [refactor](trx-frontend-http): consolidate to single auth interface Remove duplicate logout button from About tab. Use only the header Login/Logout button for unified authentication control. The About tab now shows the authentication badge (when logged in) without the redundant logout button. Single login view: - Auth gate with Login form + Continue as Guest button (when no rx pass) - Header Login/Logout button for quick access - Auth badge in About tab showing current role Co-Authored-By: Claude Opus 4.6 Signed-off-by: Stanislaw Grams --- .../trx-frontend/trx-frontend-http/assets/web/app.js | 10 ---------- .../trx-frontend-http/assets/web/index.html | 5 +---- 2 files changed, 1 insertion(+), 14 deletions(-) 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 93af71d..80485cc 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 @@ -90,13 +90,11 @@ function showAuthError(msg) { } function updateAuthUI() { - const btn = document.getElementById("logout-btn"); const badge = document.getElementById("auth-badge"); const badgeRole = document.getElementById("auth-role-badge"); const headerAuthBtn = document.getElementById("header-auth-btn"); if (authRole) { - btn.style.display = "block"; badge.style.display = "block"; badgeRole.textContent = authRole === "control" ? "Control (full access)" : "RX (read-only)"; if (headerAuthBtn) { @@ -104,7 +102,6 @@ function updateAuthUI() { headerAuthBtn.style.display = "block"; } } else { - btn.style.display = "none"; badge.style.display = "none"; if (headerAuthBtn) { headerAuthBtn.textContent = "Login"; @@ -1276,13 +1273,6 @@ if (guestBtn) { }); } -// Setup logout button -document.getElementById("logout-btn").addEventListener("click", async () => { - if (confirm("Are you sure you want to logout?")) { - await authLogout(); - } -}); - // Setup header auth button (Login/Logout) const headerAuthBtn = document.getElementById("header-auth-btn"); if (headerAuthBtn) { diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html index 9b07186..779c65c 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html @@ -239,10 +239,7 @@