Refresh Fleet with discovery, operation progress, and lobby watches

This commit is contained in:
2026-09-18 11:59:14 -04:00
parent ef8ff69d17
commit 9cf0bd87f4
14 changed files with 761 additions and 240 deletions
+10 -6
View File
@@ -30,6 +30,8 @@
inactiveSince?: string | null;
gameStartedAt?: string | null;
gameEndedAt?: string | null;
compactEmpty?: boolean;
mapLabelOverride?: string;
}
let {
name,
@@ -46,7 +48,9 @@
activeSince = null,
inactiveSince = null,
gameStartedAt = null,
gameEndedAt = null
gameEndedAt = null,
compactEmpty = false,
mapLabelOverride
}: Props = $props();
function ago(iso: string | null): string {
@@ -66,7 +70,7 @@
);
let showRoster = $derived(health === 'online' || health === 'stale');
let title = $derived(serverTitle(name));
let mapLabel = $derived(mapTitle(map));
let mapLabel = $derived(mapLabelOverride ?? mapTitle(map));
let gtLabel = $derived(gametypeLabel(gametype));
let activeElapsed = $derived(activeSince ? elapsedSince(activeSince, $uiNow) : null);
@@ -106,7 +110,7 @@
{:else}
<div class="players" aria-live="polite">
<Stat
value={players ?? 0}
value={players ?? '—'}
size="md"
tone={players !== null && players > 0 ? 'online' : 'primary'}
tween
@@ -123,9 +127,9 @@
{/if}
</div>
{#if showRoster}<RoundTelemetry {name} />{/if}
{#if health === 'online' && players !== null && players > 0 && gameInProgress}<RoundTelemetry {name} since={gameStartedAt} />{/if}
{#if showTiming}
{#if showTiming && !(compactEmpty && players === 0)}
<div class="timing">
{#if activeElapsed}
<div class="metric">
@@ -159,7 +163,7 @@
{/each}
</ul>
{:else}
<div class="lobby-empty">Lobby is empty</div>
<div class="lobby-empty">{health === 'stale' ? 'Waiting for a fresh report' : players === 0 ? 'Lobby is empty' : 'Player roster unavailable'}</div>
{/if}
{/if}