Add fleet action dialog with server selection

This commit is contained in:
2026-10-07 23:41:45 -04:00
parent 7e552b700a
commit 92c50e62a1
16 changed files with 284 additions and 110 deletions
+2 -2
View File
@@ -27,7 +27,7 @@
const impactPlayers = $derived(initialServer ? players : selected && health?.state === 'online' && freshServer(selected, $uiNow) ? selected.last_players : null);
const impactRound = $derived(initialServer ? round : selected ? currentRound(selected, selected.telemetry, $uiNow) : null);
const title = $derived(initialServer ? `${actionLabels[action]} ${serverTitle(initialServer)}?` : 'Manage server');
const submitLabel = $derived(action === 'start' ? 'Start server' : action === 'destroy' ? 'Remove server when empty' : `${actionLabels[action]} when empty`);
const submitLabel = $derived(action === 'start' ? 'Start server' : action === 'destroy' ? 'Destroy server when empty' : `${actionLabels[action]} when empty`);
$effect(() => {
if (!open) return;
const fixedServer = initialServer;
@@ -92,7 +92,7 @@
{#if !server}<option value="start">Choose a server first</option>{/if}
{#if server && !applicable}<option value={action} disabled>{actionLabels[action]} unavailable</option>{/if}
{#each available as value}<option value={value}>{actionLabels[value]}</option>{/each}
{#if server}<option value="destroy">Remove server</option>{/if}
{#if server}<option value="destroy">Destroy server</option>{/if}
</select></label>
{/if}
{#if loading}<p role="status">Checking the latest server status…</p>