fix(ui): F8-06 calculator polish — drop delete-class button, reserve lock slot
- Remove the `delete <ship_class_name>` button (and `deleteClass`, `canDelete`, `.delete` CSS, `game.calculator.action.delete` i18n key) from the calculator. Delete-class lives in the ship-classes table — the broader rework will land under #53. - Bombing and cargo-capacity rows now reserve a hidden lock-slot placeholder so their value column lines up vertically with the mass/speed/attack/defence rows (which carry a lock button).
This commit is contained in:
@@ -49,7 +49,10 @@ in as a per-ship result rather than a separate mode.
|
||||
units) that the loaded-column results use. At **full** the toggle
|
||||
shows the ship's cargo capacity; a **custom** load over that capacity
|
||||
is flagged as an error. With a zero cargo block there is no hold, so
|
||||
the load is pinned to empty and the toggle is disabled.
|
||||
the load is pinned to empty and the toggle is disabled. The bombing
|
||||
and cargo-capacity rows have no goal-seek lock, but they still
|
||||
reserve a hidden lock-slot placeholder so the value column stays
|
||||
vertically aligned with the lockable rows above.
|
||||
3. **Planet area** — when an own planet is selected on the map, shows
|
||||
its MAT (overridable) and the single-turn build rate (ships per turn,
|
||||
turns per ship). The MAT follows the same lock idiom as the tech
|
||||
@@ -125,17 +128,17 @@ fourth decimal as the user types: typing `1.2345` clamps the input to
|
||||
`util.Fixed*`; `Ceil3` is a display-only helper that lives in `pkg/calc`
|
||||
so the UI and Go share one implementation.
|
||||
|
||||
## Create / load / delete
|
||||
## Create / load
|
||||
|
||||
The name field is a combobox over the player's existing classes. Picking
|
||||
an existing class loads it as a template (so you can tweak and Create a
|
||||
new one); Create is disabled while the name is invalid or duplicate
|
||||
(reusing `lib/util/ship-class-validation.ts`). When a saved class is
|
||||
loaded, a Delete affordance appears. Create / Delete reuse the existing
|
||||
`createShipClass` / `removeShipClass` order-draft flow, so the optimistic
|
||||
overlay reflects the change immediately. Ship classes are immutable after
|
||||
creation (per `game/rules.txt`), so there is no edit — only Create-new
|
||||
and Delete.
|
||||
(reusing `lib/util/ship-class-validation.ts`). Create reuses the existing
|
||||
`createShipClass` order-draft flow, so the optimistic overlay reflects
|
||||
the change immediately. Ship classes are immutable after creation (per
|
||||
`game/rules.txt`), so there is no edit — only Create-new. Delete-class
|
||||
lives in the ship-classes table (`lib/active-view/table-ship-classes.svelte`),
|
||||
not the calculator.
|
||||
|
||||
Selecting a class from the dropdown loads it **immediately**, the
|
||||
moment the option is clicked. (Native `change` only fires on blur in
|
||||
|
||||
Reference in New Issue
Block a user