Show min/max players in results rows
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user