mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-02 16:52:31 +00:00
rework file actions, closes #3
This commit is contained in:
@@ -908,6 +908,16 @@ export const dbUtils = {
|
||||
});
|
||||
});
|
||||
},
|
||||
deleteSelectedFiles: () => {
|
||||
if (get(selection).size === 0) {
|
||||
return;
|
||||
}
|
||||
applyGlobal((draft) => {
|
||||
applyToOrderedSelectedItemsFromFile((fileId, level, items) => {
|
||||
draft.delete(fileId);
|
||||
});
|
||||
});
|
||||
},
|
||||
deleteAllFiles: () => {
|
||||
applyGlobal((draft) => {
|
||||
draft.clear();
|
||||
|
Reference in New Issue
Block a user