[fix](trx-frontend-http): show guest button after logout when available
After logout, check if guest mode is available and show the "Continue as Guest" button if no rx_passphrase is configured. Previously, authLogout() always passed false to showAuthGate(), hiding the guest button. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
@@ -54,7 +54,11 @@ async function authLogout() {
|
|||||||
document.getElementById("loading").style.display = "none";
|
document.getElementById("loading").style.display = "none";
|
||||||
document.getElementById("auth-passphrase").value = "";
|
document.getElementById("auth-passphrase").value = "";
|
||||||
updateAuthUI();
|
updateAuthUI();
|
||||||
showAuthGate(false);
|
|
||||||
|
// Check if guest mode is available after logout
|
||||||
|
const authStatus = await checkAuthStatus();
|
||||||
|
const allowGuest = authStatus.role === "rx";
|
||||||
|
showAuthGate(allowGuest);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Logout failed:", e);
|
console.error("Logout failed:", e);
|
||||||
showAuthError("Logout failed");
|
showAuthError("Logout failed");
|
||||||
|
|||||||
Reference in New Issue
Block a user