mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-14 10:35:11 +00:00
fileStorage: add archive actions
This allows users to back up all files to their computer.
This commit is contained in:
@@ -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,
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user