fix(ui): ограничить каталог бэкапов и вернуть фокус действий

This commit is contained in:
Denozordec committed 2026-10-04 05:01:29 +07:00
1 parent 5d9a6f3757
commit 611e542ea7
11 files changed
+123 -35

No files matched your search

@@ -21,16 +21,18 @@ export function BackupDeleteDialog({
error,
onConfirm,
onCancel,
returnFocus,
}: {
backup: Backup | null
busy: boolean
error?: string | null
onConfirm: () => void
onCancel: () => void
returnFocus?: () => HTMLElement | null
}) {
return (
<AlertDialog open={Boolean(backup)} onOpenChange={(v) => { if (!v && !busy) onCancel() }}>
<AlertDialogContent>
<AlertDialogContent finalFocus={returnFocus}>
<AlertDialogHeader>
<AlertDialogMedia className="bg-destructive/10 text-destructive">
<AlertCircleIcon />
@@ -61,6 +63,7 @@ export function BackupRestoreDialog({
error,
onConfirm,
onCancel,
returnFocus,
}: {
backup: Backup | null
busy: boolean
@@ -68,10 +71,11 @@ export function BackupRestoreDialog({
error?: string | null
onConfirm: () => void
onCancel: () => void
returnFocus?: () => HTMLElement | null
}) {
return (
<AlertDialog open={Boolean(backup)} onOpenChange={(v) => { if (!v && !busy) onCancel() }}>
<AlertDialogContent>
<AlertDialogContent finalFocus={returnFocus}>
<AlertDialogHeader>
<AlertDialogMedia className="bg-warning/10 text-warning">
<TriangleAlertIcon />