Show suggest-phase hint until first submission

This commit is contained in:
2026-02-08 16:06:24 +01:00
parent d534fc256b
commit d9466d9194
7 changed files with 16 additions and 5 deletions

View File

@@ -19,6 +19,7 @@ Help a small Discord group (48 players) pick a co-op game via phased flow:
- Name required; optional genre, description, screenshot URL, YouTube URL, external game link, min/max players - Name required; optional genre, description, screenshot URL, YouTube URL, external game link, min/max players
- Players see only their own suggestions until voting - Players see only their own suggestions until voting
- A player can enter Vote only after submitting at least one own suggestion - 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 - Screenshots validated as reachable images
## Vote Phase ## Vote Phase

View File

@@ -173,6 +173,10 @@ button .chip {
align-items: center; align-items: center;
} }
.nav-hint {
font-weight: 600;
}
.warning-text { .warning-text {
color: #b23b3b; color: #b23b3b;
font-weight: 600; font-weight: 600;

View File

@@ -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 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. 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." ### „Ungültiger Admin-Schlüssel."

View File

@@ -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 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. 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." ### "Invalid admin key."

View File

@@ -121,6 +121,7 @@
<p data-i18n="nav.freezeHint">Moving forward will freeze your suggestions. Titles become locked; only extra details stay editable.</p> <p data-i18n="nav.freezeHint">Moving forward will freeze your suggestions. Titles become locked; only extra details stay editable.</p>
</div> </div>
<div class="nav-actions"> <div class="nav-actions">
<span id="nav-suggest-hint" class="muted nav-hint" data-i18n="nav.addSuggestionFirst">Add a game first</span>
<button id="nav-suggest-next" class="primary" data-i18n="nav.next">Next</button> <button id="nav-suggest-next" class="primary" data-i18n="nav.next">Next</button>
</div> </div>
</div> </div>

View File

@@ -25,6 +25,7 @@ export async function loadSuggestData() {
if (state.phase !== "Suggest") return; if (state.phase !== "Suggest") return;
state.mySuggestions = await api.mySuggestions(); state.mySuggestions = await api.mySuggestions();
renderMySuggestions(); renderMySuggestions();
updatePhaseNav();
} }
export async function loadSuggestionsData() { export async function loadSuggestionsData() {

View File

@@ -249,14 +249,16 @@ export function updatePhaseNav() {
}); });
const suggestNext = $("nav-suggest-next"); const suggestNext = $("nav-suggest-next");
const suggestHint = $("nav-suggest-hint");
if (suggestNext) { if (suggestNext) {
const hasSuggestions = (state.mySuggestions?.length ?? 0) > 0; const hasSuggestions = (state.mySuggestions?.length ?? 0) > 0;
const needsSuggestion = phase === "Suggest" && !hasSuggestions; const needsSuggestion = phase === "Suggest" && !hasSuggestions;
suggestNext.disabled = needsSuggestion; suggestNext.classList.toggle("hidden", needsSuggestion);
suggestNext.classList.toggle("needs-suggestion", needsSuggestion); suggestNext.textContent = t("nav.next");
suggestNext.textContent = needsSuggestion if (suggestHint) {
? t("nav.addSuggestionFirst") suggestHint.classList.toggle("hidden", !needsSuggestion);
: t("nav.next"); suggestHint.textContent = t("nav.addSuggestionFirst");
}
} }
const voteNext = $("nav-vote-next"); const voteNext = $("nav-vote-next");