Private
Public Access
1
0

fix: Changing player color while connected

This commit is contained in:
gauvainboiche
2026-03-31 23:01:18 +02:00
parent 25a834adcc
commit bbd82a8012

View File

@@ -39,7 +39,8 @@ export function applyUser(user, token) {
authToken = token;
localStorage.setItem("authToken", token);
setCurrentTeam(user.team);
userDisplayEl.textContent = `${user.username} [${user.team}]`;
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");
}