Private
Public Access
1
0

refacto: Replaced useless DB queries by websocket calls + patching WS auth-token leak

This commit is contained in:
gauvainboiche
2026-04-01 18:47:37 +02:00
parent e28a2d6e9c
commit f161ccb0f0
33 changed files with 6246 additions and 43 deletions

View File

@@ -42,6 +42,7 @@ export function applyUser(user, token) {
const teamColor = user.team === "blue" ? "rgba(90,200,255,0.9)" : "rgba(220,75,85,0.9)";
userDisplayEl.innerHTML = `<span style="color:${teamColor}">${user.username}</span>`;
logoutBtn.classList.remove("hidden");
window.dispatchEvent(new CustomEvent("auth:changed"));
}
function logout() {
@@ -51,6 +52,7 @@ function logout() {
userDisplayEl.textContent = "—";
logoutBtn.classList.add("hidden");
showAuthOverlay();
window.dispatchEvent(new CustomEvent("auth:changed"));
}
// ── Session restore ───────────────────────────────────────────────────────────