From d2dec1be067630934481fc96cbdc47b891ac98cb Mon Sep 17 00:00:00 2001 From: bruno Date: Fri, 24 Jul 2026 09:55:43 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20both=20logout=20buttons=20now=20use=20in?= =?UTF-8?q?line=20onclick=20=E2=80=94=20no=20JS=20handlers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Header #logout-btn: inline fetch+clear localStorage+redirect - Settings #profile-logout: inline window.handleLogout or fetch fallback - Removed all JS event listeners that were causing race conditions - Zero dependency on ES module loading order --- frontend/index.html | 1 + frontend/js/auth.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/index.html b/frontend/index.html index 4922b43..a04201d 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -661,6 +661,7 @@ id="logout-btn" type="button" role="menuitem" + onclick="fetch('/api/auth/logout',{method:'POST',credentials:'include'}).then(function(){localStorage.clear();window.location.href='/'}).catch(function(){localStorage.clear();window.location.href='/'})" > AuthManager.logout()); + // Logout button — handled inline in index.html const adminRow = document.getElementById("admin-menu-row"); if (adminRow) {