fix(backups): сохранять неизвестный результат восстановления
This commit is contained in:
1 parent
39570656c9
commit
6f152c8dfe
11 files changed
+159
-11
No files matched your search
@@ -57,12 +57,14 @@ export function BackupDeleteDialog({
|
||||
export function BackupRestoreDialog({
|
||||
backup,
|
||||
busy,
|
||||
blocked = false,
|
||||
error,
|
||||
onConfirm,
|
||||
onCancel,
|
||||
}: {
|
||||
backup: Backup | null
|
||||
busy: boolean
|
||||
blocked?: boolean
|
||||
error?: string | null
|
||||
onConfirm: () => void
|
||||
onCancel: () => void
|
||||
@@ -91,8 +93,8 @@ export function BackupRestoreDialog({
|
||||
</AlertDialogHeader>
|
||||
{error && <p role="alert" className="text-sm text-destructive break-words">{error}</p>}
|
||||
<AlertDialogFooter>
|
||||
<AlertDialogCancel disabled={busy} onClick={onCancel}>Отмена</AlertDialogCancel>
|
||||
<AlertDialogAction disabled={busy} onClick={onConfirm}>
|
||||
<AlertDialogCancel disabled={busy} onClick={onCancel}>{blocked && !busy ? "Закрыть" : "Отмена"}</AlertDialogCancel>
|
||||
<AlertDialogAction disabled={busy || blocked} onClick={onConfirm}>
|
||||
{busy ? <LoaderCircleIcon className="size-4 animate-spin" /> : null}
|
||||
Восстановить
|
||||
</AlertDialogAction>
|
||||
|
||||
Reference in new issue
Block a user