fileStorage: add archive actions

This allows users to back up all files to their computer.
This commit is contained in:
David Lechner
2022-03-02 10:33:21 -06:00
parent 12f34eb210
commit bc7e9e2a20
5 changed files with 209 additions and 1 deletions
+23
View File
@@ -108,3 +108,26 @@ export const fileStorageDidFailToExportFile = createAction(
error,
}),
);
/**
* Request to archive (download) all files in the store.
*/
export const fileStorageArchiveAllFiles = createAction(() => ({
type: 'fileStorage.action.archiveAllFiles',
}));
/**
* Indicates that fileStorageArchiveAllFiles() succeeded.
*/
export const fileStorageDidArchiveAllFiles = createAction(() => ({
type: 'fileStorage.action.didArchiveAllFiles',
}));
/**
* Indicates that fileStorageArchiveAllFiles() failed.
* @param error The error that was raised.
*/
export const fileStorageDidFailToArchiveAllFiles = createAction((error: Error) => ({
type: 'fileStorage.action.didFailToArchiveAllFiles',
error,
}));