feat(ui): F8-10 — tables planets / ship-groups / fleets, ship-classes delete guard (#53)
Tests · UI / test (push) Waiting to run
Tests · UI / test (pull_request) Successful in 2m45s

Lights up three previously-stubbed table active views and tightens the
existing one:

  - table-planets: 4 kind checkboxes (own / foreign / uninhabited /
    unknown) + race dropdown that filters the foreign slice; row click
    selects + centres the planet on the map.
  - table-ship-groups: local + foreign groups in one grid, owner
    checkboxes, planet dropdown (destination OR origin), class
    dropdown; on-planet click focuses the destination planet, in-space
    click focuses the ship group itself (camera follows interpolated
    position).
  - table-fleets: own fleets only with the shared planet dropdown;
    on-planet click focuses the planet, in-space click centres the
    camera on the interpolated fleet position without altering the
    selection (no fleet variant in Selected).
  - table-ship-classes: per-row Delete is disabled with a count tooltip
    while at least one local ship group references the class. The
    engine refuses the removal anyway; the UI pre-empts the surface.

Wires the click → map flow through a transient `SelectionStore.focus`
/ `focusPoint` channel that `map.svelte` consumes once on mount —
in-memory only, so an F5 does not re-centre.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Ilia Denisov
2026-05-27 20:35:38 +02:00
parent ef4cecb4b2
commit 80ed11e3b6
17 changed files with 2537 additions and 22 deletions
+43
View File
@@ -335,6 +335,48 @@ const en = {
"game.sidebar.order.label.ship_group_join_fleet": "assign group {group} → fleet {fleet}",
"game.sidebar.order.label.race_relation": "declare {relation} on {acceptor}",
"game.sidebar.order.label.race_vote": "give my votes to {acceptor}",
"game.table.planets.title": "planets",
"game.table.planets.loading": "loading planets…",
"game.table.planets.empty": "no planets in the report",
"game.table.planets.column.number": "#",
"game.table.planets.column.name": "name",
"game.table.planets.column.kind": "kind",
"game.table.planets.column.owner": "owner",
"game.table.planets.column.size": "size",
"game.table.planets.column.resources": "resources",
"game.table.planets.column.coordinates": "x,y",
"game.table.planets.kind.own": "own",
"game.table.planets.kind.foreign": "foreign",
"game.table.planets.kind.uninhabited": "uninhabited",
"game.table.planets.kind.unknown": "unknown",
"game.table.planets.filter.owner": "owner:",
"game.table.planets.filter.owner.all": "all races",
"game.table.ship_groups.title": "ship groups",
"game.table.ship_groups.loading": "loading ship groups…",
"game.table.ship_groups.empty": "no ship groups in the report",
"game.table.ship_groups.column.owner": "owner",
"game.table.ship_groups.column.class": "class",
"game.table.ship_groups.column.count": "count",
"game.table.ship_groups.column.race": "race",
"game.table.ship_groups.column.location": "location",
"game.table.ship_groups.column.mass": "mass",
"game.table.ship_groups.column.speed": "speed",
"game.table.ship_groups.owner.own": "own",
"game.table.ship_groups.owner.foreign": "foreign",
"game.table.ship_groups.filter.planet": "planet:",
"game.table.ship_groups.filter.planet.all": "all planets",
"game.table.ship_groups.filter.class": "class:",
"game.table.ship_groups.filter.class.all": "all classes",
"game.table.fleets.title": "fleets",
"game.table.fleets.loading": "loading fleets…",
"game.table.fleets.empty": "no fleets in the report",
"game.table.fleets.column.name": "name",
"game.table.fleets.column.groups": "groups",
"game.table.fleets.column.state": "state",
"game.table.fleets.column.location": "location",
"game.table.fleets.column.speed": "speed",
"game.table.fleets.filter.planet": "planet:",
"game.table.fleets.filter.planet.all": "all planets",
"game.table.ship_classes.title": "ship classes",
"game.table.ship_classes.column.name": "name",
"game.table.ship_classes.column.drive": "drive",
@@ -347,6 +389,7 @@ const en = {
"game.table.ship_classes.filter.placeholder": "filter by name",
"game.table.ship_classes.action.new": "+ new ship class",
"game.table.ship_classes.action.delete": "delete",
"game.table.ship_classes.action.delete.in_use": "in use by {count} ship group(s)",
"game.table.ship_classes.loading": "loading ship classes…",
"game.designer.ship_class.title.new": "design new ship class",
"game.designer.ship_class.title.view": "ship class {name}",
+43
View File
@@ -336,6 +336,48 @@ const ru: Record<keyof typeof en, string> = {
"game.sidebar.order.label.ship_group_join_fleet": "включить группу {group} → флот {fleet}",
"game.sidebar.order.label.race_relation": "объявить {relation} расе {acceptor}",
"game.sidebar.order.label.race_vote": "отдать голоса расе {acceptor}",
"game.table.planets.title": "планеты",
"game.table.planets.loading": "загрузка планет…",
"game.table.planets.empty": "в отчёте нет планет",
"game.table.planets.column.number": "#",
"game.table.planets.column.name": "название",
"game.table.planets.column.kind": "тип",
"game.table.planets.column.owner": "владелец",
"game.table.planets.column.size": "размер",
"game.table.planets.column.resources": "ресурсы",
"game.table.planets.column.coordinates": "x,y",
"game.table.planets.kind.own": "свои",
"game.table.planets.kind.foreign": "чужие",
"game.table.planets.kind.uninhabited": "ничейные",
"game.table.planets.kind.unknown": "неизвестные",
"game.table.planets.filter.owner": "владелец:",
"game.table.planets.filter.owner.all": "все расы",
"game.table.ship_groups.title": "группы кораблей",
"game.table.ship_groups.loading": "загрузка групп кораблей…",
"game.table.ship_groups.empty": "в отчёте нет групп кораблей",
"game.table.ship_groups.column.owner": "владелец",
"game.table.ship_groups.column.class": "класс",
"game.table.ship_groups.column.count": "количество",
"game.table.ship_groups.column.race": "раса",
"game.table.ship_groups.column.location": "положение",
"game.table.ship_groups.column.mass": "масса",
"game.table.ship_groups.column.speed": "скорость",
"game.table.ship_groups.owner.own": "свои",
"game.table.ship_groups.owner.foreign": "чужие",
"game.table.ship_groups.filter.planet": "планета:",
"game.table.ship_groups.filter.planet.all": "все планеты",
"game.table.ship_groups.filter.class": "класс:",
"game.table.ship_groups.filter.class.all": "все классы",
"game.table.fleets.title": "флоты",
"game.table.fleets.loading": "загрузка флотов…",
"game.table.fleets.empty": "в отчёте нет флотов",
"game.table.fleets.column.name": "название",
"game.table.fleets.column.groups": "групп",
"game.table.fleets.column.state": "состояние",
"game.table.fleets.column.location": "положение",
"game.table.fleets.column.speed": "скорость",
"game.table.fleets.filter.planet": "планета:",
"game.table.fleets.filter.planet.all": "все планеты",
"game.table.ship_classes.title": "классы кораблей",
"game.table.ship_classes.column.name": "название",
"game.table.ship_classes.column.drive": "двигатель",
@@ -348,6 +390,7 @@ const ru: Record<keyof typeof en, string> = {
"game.table.ship_classes.filter.placeholder": "фильтр по названию",
"game.table.ship_classes.action.new": "+ новый класс корабля",
"game.table.ship_classes.action.delete": "удалить",
"game.table.ship_classes.action.delete.in_use": "используется в {count} группе(-ах) кораблей",
"game.table.ship_classes.loading": "загрузка классов кораблей…",
"game.designer.ship_class.title.new": "конструктор нового класса корабля",
"game.designer.ship_class.title.view": "класс корабля {name}",