mirror of
https://github.com/rommapp/romm.git
synced 2026-12-06 15:54:45 +01:00
Generic confirmation dialog with three friction levels (low / medium
embedded in feature dialogs / high via requireTyped). Mounted once
in GlobalDialogs alongside the other emitter-driven dialogs, opened
via the useConfirm() composable which returns Promise<boolean> so
call sites read as:
const ok = await confirm({ title, body, requireTyped: "DELETE" });
if (!ok) return;
Type-to-confirm is the constitution-mandated friction level for
filesystem-affecting actions; tone="danger" tints the confirm
button red; default focus lands on Cancel so a stray Enter doesn't
destroy work.
Adds two events to the canonical Events map (additive; v1 keeps
working): showConfirm carries the payload, confirmResolved routes
the user's choice back to the awaiting promise via id matching.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>