mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-21 05:10:41 +00:00
feat: enhance backup functionality with attachment options
- Added support for including attachments in backup exports. - Updated backup-related interfaces and functions to handle attachment options. - Introduced a new UI component for selecting attachment inclusion during backup operations. - Modified existing components to integrate the new attachment functionality. - Improved user feedback and error handling during backup processes.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { useMemo } from 'preact/hooks';
|
||||
import {
|
||||
buildCompleteAdminBackupExport,
|
||||
deleteRemoteBackup,
|
||||
downloadRemoteBackup,
|
||||
exportAdminBackup,
|
||||
getAdminBackupSettings,
|
||||
importAdminBackup,
|
||||
listRemoteBackups,
|
||||
@@ -24,8 +24,8 @@ export default function useBackupActions(options: UseBackupActionsOptions) {
|
||||
|
||||
return useMemo(
|
||||
() => ({
|
||||
async exportBackup() {
|
||||
const payload = await exportAdminBackup(authedFetch);
|
||||
async exportBackup(includeAttachments: boolean = false) {
|
||||
const payload = await buildCompleteAdminBackupExport(authedFetch, includeAttachments);
|
||||
downloadBytesAsFile(payload.bytes, payload.fileName, payload.mimeType);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user