fix: both logout buttons now use inline onclick — no JS handlers

- 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
This commit is contained in:
2026-07-24 09:55:43 -04:00
parent 317065f986
commit d2dec1be06
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -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='/'})"
>
<span
class="menu-list-icon"