Add per-user phase navigation with results toggle

This commit is contained in:
2026-02-04 21:43:12 +01:00
parent b64a33d833
commit e5e27af0af
24 changed files with 507 additions and 88 deletions

View File

@@ -8,6 +8,7 @@ export async function loadState() {
state.me = me;
state.prevPhase = state.phase;
state.phase = stateData.currentPhase;
state.resultsOpen = stateData.resultsOpen;
state.counts = stateData;
if (state.prevPhase !== state.phase && state.phase === "Vote") {
state.votesRendered = false;
@@ -52,7 +53,7 @@ export async function loadVoteData() {
}
export async function loadResults() {
if (state.phase !== "Results") return;
if (state.phase !== "Results" || !state.resultsOpen) return;
state.results = await api.results();
renderResults();
}