Add event-driven state sync with ETag optimization

This commit is contained in:
2026-02-18 19:58:57 +01:00
parent 5b921063ec
commit 3c7f3d2114
17 changed files with 493 additions and 30 deletions

View File

@@ -17,6 +17,7 @@ export const state = {
votesRendered: false,
adminVoteStatus: null,
adminStatusSelectActive: false,
stateEtag: null,
};
export function clearUserState() {
@@ -34,7 +35,9 @@ export function clearUserState() {
state.myVotes = [];
state.results = [];
state.votesRendered = false;
state.adminVoteStatus = null;
state.adminStatusSelectActive = false;
state.stateEtag = null;
const adminCard = document.getElementById("admin-card");
if (adminCard) adminCard.classList.add("hidden");
}