feat(ui): show prefixed naming disabled outside copy mode

Hiding prefixed unless the draft mode was copy made the option hard to
discover, and a user who left copy mode with prefixed drafted kept a
naming the server would reject on save. Following the approved design,
the naming control now always lists flat, standard and prefixed;
prefixed is a disabled segment with a "Needs copy mode" tooltip and an
info line saying why. Leaving copy mode resets a drafted prefixed back
to the saved naming (or flat when prefixed was saved), and a pending tag
marks an unsaved naming change.

SegmentedControl gains a per-option disabled flag. Its title no longer
replaces a text label's accessible name, so the disabled segment is
still announced as "prefixed"; icon-only options keep title as name.
This commit is contained in:
Willie
2026-10-09 02:23:46 +08:00
parent 73a3c5176a
commit 3d55f4cb1a
15 changed files with 157 additions and 17 deletions
+1
View File
@@ -122,6 +122,7 @@ svg.lucide { flex: none; stroke-width: var(--isw); }
.ss-seg { display: inline-flex; padding: 2px; gap: 2px; background: var(--sunken); border: var(--bw) solid var(--line); border-radius: 9px; }
.ss-seg>* { height: 28px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1 var(--f); color: var(--ink-2); border-radius: 7px; }
.ss-seg>*.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(20,19,18,.12); }
.ss-seg>*:disabled { opacity: .45; }
:root[data-theme="playful"] .ss-seg { border-radius: var(--r-ctl); background: var(--surface); padding: 3px; }
:root[data-theme="playful"] .ss-seg>* { border-radius: var(--r-ctl); }
:root[data-theme="playful"] .ss-seg>*.on { background: var(--sel); color: var(--sel-ink); box-shadow: none; outline: 1.5px solid var(--line); }