diff --git a/SPEC.md b/SPEC.md index c1d38f0..dbea247 100644 --- a/SPEC.md +++ b/SPEC.md @@ -19,6 +19,7 @@ Help a small Discord group (4–8 players) pick a co-op game via phased flow: - Name required; optional genre, description, screenshot URL, YouTube URL, external game link, min/max players - Players see only their own suggestions until voting - A player can enter Vote only after submitting at least one own suggestion +- The Suggest phase shows a non-interactive “add a game first” hint until the first successful suggestion, then immediately shows the `Next` button - Screenshots validated as reachable images ## Vote Phase diff --git a/wwwroot/css/components.css b/wwwroot/css/components.css index c6a8786..8039640 100644 --- a/wwwroot/css/components.css +++ b/wwwroot/css/components.css @@ -173,6 +173,10 @@ button .chip { align-items: center; } +.nav-hint { + font-weight: 600; +} + .warning-text { color: #b23b3b; font-weight: 600; diff --git a/wwwroot/data/i18n/faq/de.md b/wwwroot/data/i18n/faq/de.md index 4f88c95..501b7b6 100644 --- a/wwwroot/data/i18n/faq/de.md +++ b/wwwroot/data/i18n/faq/de.md @@ -183,6 +183,7 @@ Warte auf die Abstimmungsphase und bitte bei Bedarf um einen Joker. ### „Füge mindestens einen Vorschlag hinzu, bevor du in die Abstimmungsphase wechselst." Füge mit deinem aktuellen Konto mindestens einen Spielvorschlag hinzu. Erst dann kannst du von der Vorschlagsphase in die Abstimmungsphase wechseln. Diesese Verhalten erschwert die Abgabe von mehreren Stimmen pro Benutzer. +Bis dahin zeigt die Navigation in der Vorschlagsphase einen Hinweis statt eines Weiter-Buttons und wechselt direkt nach der ersten erfolgreichen Einreichung. ### „Ungültiger Admin-Schlüssel." diff --git a/wwwroot/data/i18n/faq/en.md b/wwwroot/data/i18n/faq/en.md index 8b2ef18..8eb205a 100644 --- a/wwwroot/data/i18n/faq/en.md +++ b/wwwroot/data/i18n/faq/en.md @@ -187,6 +187,7 @@ Wait for the Vote phase and request a joker if needed. ### "Add at least one suggestion before entering the Vote phase." Add at least one game suggestion with your current account. Only then can you move from Suggest to Vote. This behavior hinders the submission of multiple votes per user. +Until then, the Suggest navigation shows a hint instead of a Next button, and switches immediately after your first successful submission. ### "Invalid admin key." diff --git a/wwwroot/index.html b/wwwroot/index.html index 85f3bbb..421cbb4 100644 --- a/wwwroot/index.html +++ b/wwwroot/index.html @@ -121,6 +121,7 @@

Moving forward will freeze your suggestions. Titles become locked; only extra details stay editable.

diff --git a/wwwroot/js/data.js b/wwwroot/js/data.js index c9d4db8..5d8284c 100644 --- a/wwwroot/js/data.js +++ b/wwwroot/js/data.js @@ -25,6 +25,7 @@ export async function loadSuggestData() { if (state.phase !== "Suggest") return; state.mySuggestions = await api.mySuggestions(); renderMySuggestions(); + updatePhaseNav(); } export async function loadSuggestionsData() { diff --git a/wwwroot/js/votes-ui.js b/wwwroot/js/votes-ui.js index 941f4b7..838fb2e 100644 --- a/wwwroot/js/votes-ui.js +++ b/wwwroot/js/votes-ui.js @@ -249,14 +249,16 @@ export function updatePhaseNav() { }); const suggestNext = $("nav-suggest-next"); + const suggestHint = $("nav-suggest-hint"); if (suggestNext) { const hasSuggestions = (state.mySuggestions?.length ?? 0) > 0; const needsSuggestion = phase === "Suggest" && !hasSuggestions; - suggestNext.disabled = needsSuggestion; - suggestNext.classList.toggle("needs-suggestion", needsSuggestion); - suggestNext.textContent = needsSuggestion - ? t("nav.addSuggestionFirst") - : t("nav.next"); + suggestNext.classList.toggle("hidden", needsSuggestion); + suggestNext.textContent = t("nav.next"); + if (suggestHint) { + suggestHint.classList.toggle("hidden", !needsSuggestion); + suggestHint.textContent = t("nav.addSuggestionFirst"); + } } const voteNext = $("nav-vote-next");