feat(persons): add confirm dialog to provisional confirm action

Confirming a provisional person was a one-click write — easy to fat-finger
on a touchscreen and irreversible (the person disappears from the review
list, with no obvious undo path). Mirror the destructive-delete pattern
with a non-destructive confirm dialog (destructive: false) so the action
requires a second deliberate click.

New i18n keys (persons_review_confirm_confirm_title/text/button) added
to all three locales (de, en, es).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-28 10:36:38 +02:00
parent a9cac08f3c
commit a670ba014c
4 changed files with 22 additions and 1 deletions

View File

@@ -62,7 +62,19 @@ const deleteBtn =
>
{m.persons_review_action_rename()}
</button>
<form method="POST" action="?/confirm" use:enhance>
<form
method="POST"
action="?/confirm"
use:enhance={async ({ cancel }) => {
const ok = await confirm({
title: m.persons_review_confirm_confirm_title(),
body: m.persons_review_confirm_confirm_text(),
confirmLabel: m.persons_review_confirm_confirm_button(),
destructive: false
});
if (!ok) cancel();
}}
>
<input type="hidden" name="id" value={person.id} />
<button type="submit" class={actionBtn}>{m.persons_review_action_confirm()}</button>
</form>