Make edit modal match add form layout with labeled fields
This commit is contained in:
@@ -534,9 +534,18 @@ function openEditModal(s) {
|
||||
</div>
|
||||
<div class="edit-body">
|
||||
<form class="stack" id="edit-form">
|
||||
<input name="name" required maxlength="100" placeholder="${t("form.placeholder.gameName")}" value="${s.name ?? ""}" />
|
||||
<input name="genre" maxlength="50" placeholder="${t("form.placeholder.genre")}" value="${s.genre ?? ""}" />
|
||||
<textarea name="description" maxlength="500" placeholder="${t("form.placeholder.description")}">${s.description ?? ""}</textarea>
|
||||
<label class="stack">
|
||||
<span class="label" data-i18n="form.gameName">${t("form.gameName")}</span>
|
||||
<input name="name" required maxlength="100" value="${s.name ?? ""}" />
|
||||
</label>
|
||||
<label class="stack">
|
||||
<span class="label" data-i18n="form.genre">${t("form.genre")}</span>
|
||||
<input name="genre" maxlength="50" value="${s.genre ?? ""}" />
|
||||
</label>
|
||||
<label class="stack">
|
||||
<span class="label" data-i18n="form.description">${t("form.description")}</span>
|
||||
<textarea name="description" maxlength="500">${s.description ?? ""}</textarea>
|
||||
</label>
|
||||
<div class="stack">
|
||||
<span class="label">${t("form.players")}</span>
|
||||
<div class="stack horizontal">
|
||||
@@ -550,11 +559,18 @@ function openEditModal(s) {
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stack horizontal">
|
||||
<input name="screenshotUrl" maxlength="2048" placeholder="${t("form.placeholder.screenshot")}" value="${s.screenshotUrl ?? ""}" />
|
||||
<input name="youtubeUrl" maxlength="2048" placeholder="${t("form.placeholder.youtube")}" value="${s.youtubeUrl ?? ""}" />
|
||||
<input name="gameUrl" maxlength="2048" placeholder="${t("form.placeholder.gameUrl")}" value="${s.gameUrl ?? ""}" />
|
||||
</div>
|
||||
<label class="stack">
|
||||
<span class="label" data-i18n="form.screenshot">${t("form.screenshot")}</span>
|
||||
<input name="screenshotUrl" maxlength="2048" value="${s.screenshotUrl ?? ""}" />
|
||||
</label>
|
||||
<label class="stack">
|
||||
<span class="label" data-i18n="form.youtube">${t("form.youtube")}</span>
|
||||
<input name="youtubeUrl" maxlength="2048" value="${s.youtubeUrl ?? ""}" />
|
||||
</label>
|
||||
<label class="stack">
|
||||
<span class="label" data-i18n="form.gameUrl">${t("form.gameUrl")}</span>
|
||||
<input name="gameUrl" maxlength="2048" value="${s.gameUrl ?? ""}" />
|
||||
</label>
|
||||
<div class="stack horizontal">
|
||||
<button type="submit">${t("modal.save")}</button>
|
||||
<button type="button" class="ghost" id="edit-cancel">${t("modal.cancel")}</button>
|
||||
@@ -661,10 +677,10 @@ function normalizeSuggestionForm(formData) {
|
||||
}
|
||||
|
||||
function scoreToEmoji(score) {
|
||||
if (score <= 1) return "😡";
|
||||
if (score < 1) return "😡";
|
||||
if (score <= 3) return "😠";
|
||||
if (score <= 5) return "😐";
|
||||
if (score <= 7) return "🙂";
|
||||
if (score <= 8) return "😃";
|
||||
if (score <= 6) return "😐";
|
||||
if (score <= 8) return "🙂";
|
||||
if (score <= 9) return "😃";
|
||||
return "🤩";
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ const translations = {
|
||||
"counts.format": "Players: {players} • Suggestions: {suggestions} • Votes: {votes}",
|
||||
|
||||
"suggest.title": "Suggest (up to 5)",
|
||||
"suggest.new": "Add new suggestion",
|
||||
"suggest.hint": "Only you can see your suggestions until Reveal.",
|
||||
"form.gameName": "Game name *",
|
||||
"form.genre": "Genre",
|
||||
@@ -126,6 +127,7 @@ const translations = {
|
||||
"counts.format": "Spieler: {players} • Vorschläge: {suggestions} • Stimmen: {votes}",
|
||||
|
||||
"suggest.title": "Vorschlagen (bis zu 5)",
|
||||
"suggest.new": "Neuen Vorschlag hinzufügen",
|
||||
"suggest.hint": "Nur du siehst deine Vorschläge bis zur Enthüllung.",
|
||||
"form.gameName": "Spielname *",
|
||||
"form.genre": "Genre",
|
||||
|
||||
Reference in New Issue
Block a user