Skip reveal phase and freeze titles after suggestions

This commit is contained in:
2026-02-04 22:06:43 +01:00
parent 0f6a0fb35a
commit 90bcde6f36
8 changed files with 13 additions and 44 deletions

View File

@@ -298,9 +298,7 @@ function bindNavButtons() {
});
});
});
makeForward("nav-reveal-next");
makeForward("nav-vote-next");
makeBack("nav-reveal-prev");
makeBack("nav-vote-prev");
}

View File

@@ -17,6 +17,7 @@
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
gap: 12px;
margin-top: 12px;
margin-bottom: 12px;
width: 100%;
max-width: 1280px;
margin-inline: auto;

View File

@@ -91,7 +91,7 @@
<div class="phase-header">
<div class="phase-text">
<h2 data-i18n="suggest.title">Suggest (up to 5)</h2>
<p class="hint" data-i18n="suggest.hint">Only you can see your suggestions until Reveal.</p>
<p class="hint" data-i18n="suggest.hint">Only you can see your suggestions until voting starts.</p>
</div>
<button id="open-suggest-modal" class="ghost" data-i18n="suggest.addButton">Suggest a game</button>
</div>
@@ -110,22 +110,6 @@
</div>
</div>
<div id="reveal-view" class="phase-view hidden">
<div class="phase-header">
<h2 id="reveal-title" data-i18n="section.allSuggestions">All Suggestions</h2>
</div>
<div id="all-suggestions" class="card-grid"></div>
<div class="card subcard phase-nav" id="nav-reveal">
<div class="nav-text">
<p data-i18n="nav.revealHint">Review all games, then advance to voting when ready.</p>
</div>
<div class="nav-actions">
<button id="nav-reveal-prev" class="ghost" data-i18n="nav.prev">Back</button>
<button id="nav-reveal-next" class="primary" data-i18n="nav.next">Next</button>
</div>
</div>
</div>
<div id="vote-view" class="phase-view hidden">
<div class="phase-header">
<h2 id="vote-title" data-i18n="section.vote">Vote 010</h2>

View File

@@ -26,7 +26,7 @@ export async function loadSuggestData() {
}
export async function loadRevealData() {
if (state.phase === "Reveal" || state.phase === "Vote" || state.phase === "Results") {
if (state.phase === "Vote" || state.phase === "Results") {
const latest = await api.allSuggestions();
const latestSig = signatureSuggestions(latest);
const changed = latestSig !== state.allSuggestionsSig;

View File

@@ -38,13 +38,12 @@ const translations = {
"nav.freezeHint": "Moving forward will freeze your suggestions. Titles become locked; only extra details stay editable.",
"nav.freezeModalTitle": "Freeze suggestions?",
"nav.freezeModalBody": "Once you leave Suggest, your games are locked: titles cannot be changed or deleted. Only optional details (description, links, players, artwork) remain editable. Continue?",
"nav.revealHint": "Review all games, then advance to voting when ready.",
"nav.voteHint": "Cast votes for every game to unlock results.",
"suggest.title": "Suggest games (up to 5)",
"suggest.new": "Add new suggestion",
"suggest.addButton": "Suggest a game",
"suggest.hint": "Only you can see your suggestions until Reveal.",
"suggest.hint": "Only you can see your suggestions until voting starts.",
"form.gameName": "Game name *",
"form.genre": "Genre",
"form.description": "Description",
@@ -156,13 +155,12 @@ const translations = {
"nav.freezeHint": "Beim Weitergehen werden deine Vorschläge eingefroren. Titel bleiben gesperrt; nur Zusatzinfos bleiben bearbeitbar.",
"nav.freezeModalTitle": "Vorschläge einfrieren?",
"nav.freezeModalBody": "Sobald du die Vorschlagsphase verlässt, sind deine Spiele gesperrt: Titel können nicht mehr geändert oder gelöscht werden. Nur optionale Angaben (Beschreibung, Links, Spielerzahlen, Bilder) bleiben bearbeitbar. Fortfahren?",
"nav.revealHint": "Sieh dir alle Spiele an und gehe dann zur Abstimmung weiter.",
"nav.voteHint": "Bewerte alle Spiele, um die Ergebnisse freizuschalten.",
"suggest.title": "Schlage Spiele vor (bis zu 5)",
"suggest.new": "Neuen Vorschlag hinzufügen",
"suggest.addButton": "Spiel vorschlagen",
"suggest.hint": "Nur du siehst deine Vorschläge bis zur Enthüllung.",
"suggest.hint": "Nur du siehst deine Vorschläge bis zum Start der Abstimmung.",
"form.gameName": "Spielname *",
"form.genre": "Genre",
"form.description": "Beschreibung",

View File

@@ -72,7 +72,6 @@ export function renderPhasePill() {
);
const viewMap = {
Suggest: "suggest-view",
Reveal: "reveal-view",
Vote: "vote-view",
Results: "results-view",
};
@@ -120,9 +119,7 @@ export function renderAllSuggestions() {
if (!list) return;
list.innerHTML = "";
const allowEdit = !!state.me?.isAdmin;
const allowDelete =
!!state.me?.isAdmin &&
(state.phase === "Reveal" || state.phase === "Suggest");
const allowDelete = !!state.me?.isAdmin;
state.allSuggestions.forEach((s) =>
list.appendChild(
buildCard(s, { showAuthor: true, allowEdit, allowDelete }),
@@ -269,15 +266,8 @@ function buildResultMeta(r) {
}
export function renderPhaseTitles() {
const revealTitle = $("reveal-title");
const voteTitle = $("vote-title");
const totalGames = state.allSuggestions?.length ?? 0;
if (revealTitle) {
revealTitle.textContent =
totalGames > 0
? t("section.allSuggestions.count", { count: totalGames })
: t("section.allSuggestions");
}
if (voteTitle) {
voteTitle.textContent =
totalGames > 0
@@ -726,7 +716,6 @@ export function updatePhaseNav() {
};
showNav("nav-suggest", phase === "Suggest");
showNav("nav-reveal", phase === "Reveal");
showNav("nav-vote", phase === "Vote");
const lockBadge = $("results-lock");
@@ -737,7 +726,7 @@ export function updatePhaseNav() {
}
// Toggle admin-only back buttons
const backButtons = ["nav-reveal-prev", "nav-vote-prev"];
const backButtons = ["nav-vote-prev"];
backButtons.forEach((id) => {
const btn = $(id);
if (btn) btn.classList.toggle("hidden", !isAdmin);