feat: sort-alpha button per group, settings in header, sortPosition pin

- ⇅ button on each group header: sorts units alpha (labelPlural + symbol tiebreak) via order API
- ⚙ Settings moved to admin-header alongside Log out
- Unit type gets sortPosition?: number (1-based, optional)
- Converter sort: partitions pinned/floating, inserts pins at requested slots
  Pins > length append at end; gaps fill naturally with floating items
- Admin unit form: Force position number input
This commit is contained in:
Falkan
2026-03-18 22:16:44 -04:00
parent 8ec935d238
commit 61d1d49f4b
4 changed files with 80 additions and 21 deletions

View File

@@ -30,6 +30,14 @@ export interface Unit {
/** If true, this unit is excluded from automatic rendering in the converter. */
hidden?: boolean;
/**
* Optional fixed display position (1-based) within the group's rendered list.
* Pinned units are inserted at their requested slot after floating units are ordered.
* If position > total units, the unit is appended at the end in ascending sortPosition order.
* Ties are broken by the group's natural sort order.
*/
sortPosition?: number;
}
/** A group of units sharing a base unit and a universal scale factor. */