feat(console): confirm leaving unsaved page work

Guard route changes when an editor or changed order draft is open. Cancel superseded questions and restore the shown history entry when repeated Back or Forward navigation is refused; only completed navigation resets page work.
This commit is contained in:
翅膀 committed 2026-10-17 12:03:27 +08:00
1 parent 535bfa98ce
commit 1c4639b07d
7 files changed
+104 -6

No files matched your search

+2
View File
@@ -5,6 +5,8 @@ export interface ConfirmOptions {
description?: string;
/** Label of the destructive button (defaults to "Delete"). */
confirmText?: string;
/** What the action does, shown as the dialog icon (defaults to "delete"). */
kind?: "delete" | "leave";
}
interface ConfirmRequest extends ConfirmOptions {