Show friendly map titles in fleet cards

This commit is contained in:
2026-09-17 17:34:44 -04:00
parent 885abbdffe
commit 1350e6df7c
4 changed files with 113 additions and 94 deletions
+5 -3
View File
@@ -4,6 +4,7 @@
import { uiNow } from '$ui/stores/servers.js';
import { gametypeLabel } from '$ui/gametype.js';
import { elapsedSince } from '$ui/duration.js';
import { mapTitle, serverTitle } from '$ui/server-labels.js';
import Card from './primitives/Card.svelte';
import Badge from './primitives/Badge.svelte';
import Stat from './primitives/Stat.svelte';
@@ -64,7 +65,8 @@
.slice(0, 3)
);
let showRoster = $derived(health === 'online' || health === 'stale');
let mapLabel = $derived(map ?? '—');
let title = $derived(serverTitle(name));
let mapLabel = $derived(mapTitle(map));
let gtLabel = $derived(gametypeLabel(gametype));
let activeElapsed = $derived(activeSince ? elapsedSince(activeSince, $uiNow) : null);
@@ -85,7 +87,7 @@
elevation="interactive"
padding="md"
class={restarting ? 'restarting' : health === 'offline' ? 'offline' : ''}
ariaLabel="Server {name}, {health}"
ariaLabel="Server {title}, {health}"
style={cardStyle}
>
{#if restarting}
@@ -95,7 +97,7 @@
<div class="head">
<div class="name-row">
<StatusPip {health} />
<strong class="name">{name}</strong>
<strong class="name" title={name}>{title}</strong>
</div>
{#if health === 'starting'}
<Badge variant="info" uppercase>Starting</Badge>