undo: header buttons, shortcuts, wiring

- App provides HistoryHandle as context (both build modes; stacks stay
  empty on the server) and passes it to persist::init_hydrated
- persist: init_hydrated starts undo tracking after the localStorage
  load (first captured state = saved state, not mock); clear_all and
  apply_import call undo::before_replace so they are undoable
- header: Отменить/Вернуть buttons with disabled states driven by the
  reactive stack depths; Ctrl+Z / Ctrl+Shift+Z / Ctrl+Y via a window
  keydown listener that skips editable targets (browser owns those)
- SCSS: disabled control buttons dim out
This commit is contained in:
yaroslav k committed 2026-08-16 12:31:22 +03:00
1 parent 99ccb0cdc7
commit 1f3184baf6
3 files changed
+26 -4

No files matched your search

+5
View File
@@ -59,6 +59,11 @@ header {
line-height: 1em;
margin: 2px 5px;
@include mixins.button;
&:disabled {
opacity: 0.45;
cursor: default;
}
}
}