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

+4 -2
View File
@@ -32,6 +32,7 @@ interface BackupsDataGridProps {
onDownload: (id: string, filename: string) => void
onRestore: (backup: Backup) => void
onDelete: (backup: Backup) => void
canRestore?: boolean
canWrite?: boolean
canDownload?: boolean
emptyAction?: ReactNode
@@ -50,6 +51,7 @@ function BackupsDataGrid({
onDownload,
onRestore,
onDelete,
canRestore = true,
canWrite = true,
canDownload = true,
emptyAction,
@@ -207,7 +209,7 @@ function BackupsDataGrid({
className="size-7"
title="Восстановить"
aria-label={`Восстановить ${b.filename}`}
disabled={!canWrite || !b.serverId}
disabled={!canWrite || !canRestore || !b.serverId}
onClick={() => onRestore(b)}
>
<RefreshCwIcon className="size-3.5" />
@@ -235,7 +237,7 @@ function BackupsDataGrid({
},
},
],
[onDelete, onDownload, onRestore, canWrite, canDownload],
[onDelete, onDownload, onRestore, canWrite, canRestore, canDownload],
)
const table = useTable({