rework file actions, closes #3

This commit is contained in:
vcoppe
2024-07-01 11:08:28 +02:00
parent a96d911f36
commit 8e446ec74a
4 changed files with 50 additions and 20 deletions

View File

@@ -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();