fix: hide lobby card time badge when undefined and use lowercase s

This commit is contained in:
FloPinguin
2026-03-04 20:21:27 +01:00
parent c238af389a
commit 34edf6fc57
+9 -7
View File
@@ -193,7 +193,7 @@ export class GameModeSelector extends LitElement {
let timeDisplay: string = "";
if (timeRemaining === undefined) {
timeDisplay = "-s";
timeDisplay = "";
} else if (timeRemaining > 0) {
timeDisplay = renderDuration(timeRemaining);
} else {
@@ -238,12 +238,14 @@ export class GameModeSelector extends LitElement {
)}
</div>`
: html`<div></div>`}
<div class="shrink-0">
<span
class="text-[10px] font-bold uppercase tracking-widest bg-blue-600 px-2 py-0.5 rounded"
>${timeDisplay}</span
>
</div>
${timeDisplay
? html`<div class="shrink-0">
<span
class="text-[10px] font-bold normal-case tracking-widest bg-blue-600 px-2 py-0.5 rounded"
>${timeDisplay}</span
>
</div>`
: null}
</div>
</div>
<div class="flex items-center justify-between px-3 py-2">