feat(ui): F8-11 — battles table under table submenu (#54)
Tests · UI / test (push) Successful in 2m53s
Tests · UI / test (pull_request) Successful in 3m0s

Adds a sortable battles list as a new entity under the existing
`view → table` submenu (entity slug `battles`), replacing the
standalone top-level `battle log` shortcut which always opened a
"battle not found" placeholder. The single-battle viewer stays put
and is reached only by clicking a row (or a battle marker on the
map), identical to the existing `section-battles.svelte` flow.

Columns are planet (via the shared `planetLabel` helper) and shots
(the per-battle action count carried by `BattleSummary`), sortable
both ways with shots-desc default. No backend / FBS / map changes:
the wire payload is unchanged. Participants / observers / total
mass require the full BattleReport and were intentionally dropped
to avoid N round trips per menu open.

The top-level `battle log` item is removed from `header/view-menu`
and `sidebar/bottom-tabs` (and their stale comment blocks updated);
the now-orphan `game.view.battle` i18n key is dropped from both
locales.
This commit is contained in:
Ilia Denisov
2026-05-27 22:12:51 +02:00
parent e4fbb6644c
commit 209f8508cd
10 changed files with 529 additions and 30 deletions
+7 -12
View File
@@ -8,10 +8,12 @@ or the header view-menu naturally drops the overlay.
More opens a drawer with the same destination list as the header
view-menu, each entry mutating `activeView` directly (the single-URL
app-shell has no per-view routes). A later polish pass narrows it to
the IA-spec subset (Mail, Battle log, Tables, History, Settings,
Logout) once History exists; until then the convenience of one source
of truth for destinations beats the duplication.
app-shell has no per-view routes). The Tables sub-list includes the
battles roll-up (F8-11) that replaces the standalone Battle log entry;
the single battle viewer is still reachable by clicking a row. A later
polish pass narrows it to the IA-spec subset (Mail, Tables, History,
Settings, Logout) once History exists; until then the convenience of
one source of truth for destinations beats the duplication.
-->
<script lang="ts">
import { onMount } from "svelte";
@@ -41,6 +43,7 @@ of truth for destinations beats the duplication.
{ slug: "fleets", key: "game.view.table.fleets" },
{ slug: "sciences", key: "game.view.table.sciences" },
{ slug: "races", key: "game.view.table.races" },
{ slug: "battles", key: "game.view.table.battles" },
];
function selectTool(tool: MobileTool): void {
@@ -170,14 +173,6 @@ of truth for destinations beats the duplication.
>
{i18n.t("game.view.report")}
</button>
<button
type="button"
role="menuitem"
data-testid="bottom-tabs-more-battle"
onclick={() => go("battle")}
>
{i18n.t("game.view.battle")}
</button>
<button
type="button"
role="menuitem"