mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 21:00:41 +00:00
feat: enhance backup import functionality to handle skipped items and provide detailed feedback
This commit is contained in:
@@ -86,9 +86,23 @@ export interface AdminBackupImportCounts {
|
||||
sendFiles: number;
|
||||
}
|
||||
|
||||
export interface AdminBackupImportSkippedItem {
|
||||
kind: 'attachment' | 'send-file';
|
||||
path: string;
|
||||
sizeBytes: number;
|
||||
}
|
||||
|
||||
export interface AdminBackupImportSkipped {
|
||||
reason: string | null;
|
||||
attachments: number;
|
||||
sendFiles: number;
|
||||
items: AdminBackupImportSkippedItem[];
|
||||
}
|
||||
|
||||
export interface AdminBackupImportResponse {
|
||||
object: 'instance-backup-import';
|
||||
imported: AdminBackupImportCounts;
|
||||
skipped: AdminBackupImportSkipped;
|
||||
}
|
||||
|
||||
export interface AdminBackupExportPayload {
|
||||
|
||||
@@ -25,6 +25,8 @@ const messages: Record<Locale, Record<string, string>> = {
|
||||
txt_backup_export_success: "Backup exported",
|
||||
txt_backup_import_success_relogin: "Backup restored. Please sign in again.",
|
||||
txt_backup_restore_success_relogin: "Backup restored. Please sign in again.",
|
||||
txt_backup_restore_skipped_summary: "{reason}. Skipped {attachments} attachment(s) and {sendFiles} Send file(s).",
|
||||
txt_backup_restore_skipped_reason_default: "Some files could not be restored",
|
||||
txt_backup_export_failed: "Backup export failed",
|
||||
txt_backup_import_failed: "Backup restore failed",
|
||||
txt_backup_restore_failed: "Backup restore failed",
|
||||
@@ -606,6 +608,8 @@ const zhCNOverrides: Record<string, string> = {
|
||||
txt_backup_export_success: '备份已导出',
|
||||
txt_backup_import_success_relogin: '备份已还原,请重新登录',
|
||||
txt_backup_restore_success_relogin: '备份已还原,请重新登录',
|
||||
txt_backup_restore_skipped_summary: '{reason},已跳过 {attachments} 个附件和 {sendFiles} 个 Send 文件',
|
||||
txt_backup_restore_skipped_reason_default: '部分文件无法还原',
|
||||
txt_backup_export_failed: '备份导出失败',
|
||||
txt_backup_import_failed: '备份还原失败',
|
||||
txt_backup_restore_failed: '备份还原失败',
|
||||
|
||||
Reference in New Issue
Block a user