mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-21 05:10:41 +00:00
feat: enhance backup and restore functionality with integrity checks and progress tracking
- Added support for backup integrity verification during export and restore processes. - Introduced progress dispatching for backup export and restore operations. - Implemented new API endpoints for inspecting remote backup integrity. - Enhanced user interface with progress indicators and warning dialogs for integrity issues. - Updated localization strings for new features and user feedback. - Refactored backup-related functions for better clarity and maintainability.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
export type BackupProgressOperation = 'backup-restore' | 'backup-export' | 'backup-remote-run';
|
||||
|
||||
export interface BackupProgressDetail {
|
||||
operation: BackupProgressOperation;
|
||||
source?: 'local' | 'remote';
|
||||
step: string;
|
||||
fileName: string;
|
||||
stageTitle?: string;
|
||||
stageDetail?: string;
|
||||
replaceExisting?: boolean;
|
||||
done?: boolean;
|
||||
ok?: boolean;
|
||||
error?: string | null;
|
||||
Date?: string;
|
||||
}
|
||||
|
||||
export type BackupRestoreProgressDetail = BackupProgressDetail;
|
||||
|
||||
export const BACKUP_PROGRESS_EVENT = 'nodewarden:backup-progress';
|
||||
export const BACKUP_RESTORE_PROGRESS_EVENT = BACKUP_PROGRESS_EVENT;
|
||||
|
||||
export function dispatchBackupProgress(detail: BackupProgressDetail): void {
|
||||
if (typeof window === 'undefined') return;
|
||||
window.dispatchEvent(new CustomEvent<BackupProgressDetail>(BACKUP_PROGRESS_EVENT, { detail }));
|
||||
}
|
||||
|
||||
export const dispatchBackupRestoreProgress = dispatchBackupProgress;
|
||||
Reference in New Issue
Block a user