Show min/max players in results rows

This commit is contained in:
2026-02-03 02:03:58 +01:00
parent 70ab51ba44
commit 8af26f89b3
2 changed files with 14 additions and 4 deletions

View File

@@ -236,7 +236,7 @@ export function renderResults() {
${r.screenshotUrl ? `<img class="thumb clickable-thumb" src="${r.screenshotUrl}" alt="${r.name}">` : ''}
<div class="game-meta">
<div class="title-line">${r.name}</div>
${r.genre ? `<div class="muted small">${r.genre}</div>` : ''}
${buildResultMeta(r)}
</div>
</td>
<td class="author-cell">${r.author ?? "—"}</td>
@@ -259,6 +259,16 @@ export function renderResults() {
});
}
function buildResultMeta(r) {
const hasPlayers = r.minPlayers || r.maxPlayers;
const players = hasPlayers
? t("card.players", { min: r.minPlayers ?? "?", max: r.maxPlayers ?? "?" })
: null;
const bits = [r.genre, players].filter(Boolean);
if (bits.length === 0) return "";
return `<div class="muted small">${bits.join(" • ")}</div>`;
}
export function renderPhaseTitles() {
const revealTitle = $("reveal-title");
const voteTitle = $("vote-title");