Add per-user phase navigation with results toggle
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user