feat: enhance backup import functionality to handle skipped items and provide detailed feedback

This commit is contained in:
shuaiplus
2026-03-16 00:38:44 +08:00
parent 3cb2ef1015
commit 2f448964f2
7 changed files with 149 additions and 20 deletions
+4 -2
View File
@@ -30,8 +30,9 @@ export default function useBackupActions(options: UseBackupActionsOptions) {
},
async importBackup(file: File, replaceExisting: boolean = false) {
await importAdminBackup(authedFetch, file, replaceExisting);
const result = await importAdminBackup(authedFetch, file, replaceExisting);
onImported?.();
return result;
},
async loadSettings() {
@@ -60,8 +61,9 @@ export default function useBackupActions(options: UseBackupActionsOptions) {
},
async restoreRemoteBackup(destinationId: string, path: string, replaceExisting: boolean = false) {
await restoreRemoteBackup(authedFetch, destinationId, path, replaceExisting);
const result = await restoreRemoteBackup(authedFetch, destinationId, path, replaceExisting);
onRestored?.();
return result;
},
}),
[authedFetch, onImported, onRestored]