fix(backups): сохранять неизвестный результат восстановления

This commit is contained in:
Denozordec committed 2026-10-01 16:32:06 +07:00
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>
+3
View File
@@ -29,6 +29,7 @@ export function BackupsHistory({
onDelete,
onCreate,
canCreate = true,
canRestore = true,
canWrite = true,
canDownload = true,
}: {
@@ -43,6 +44,7 @@ export function BackupsHistory({
onRestore: (backup: Backup) => void
onDelete: (backup: Backup) => void
canCreate?: boolean
canRestore?: boolean
canWrite?: boolean
canDownload?: boolean
onCreate: () => void
@@ -82,6 +84,7 @@ export function BackupsHistory({
onDownload={onDownload}
onRestore={onRestore}
onDelete={onDelete}
canRestore={canRestore}
canWrite={canWrite}
canDownload={canDownload}
emptyTitle={isEmptyAll ? "Нет бэкапов" : "Ничего не найдено"}