diff --git a/src/_node/file/types.ts b/src/_node/file/types.ts index dd522fa1..f91c815d 100644 --- a/src/_node/file/types.ts +++ b/src/_node/file/types.ts @@ -71,10 +71,6 @@ export type TProjectLoaderResponse = { }; export type TFileApiPayloadBase = { - // addInvalidNodes: (...uids: string[]) => void; - // removeInvalidNodes: (...uids: string[]) => void; - // addTemporaryNodes: (...uids: string[]) => void; - // removeTemporaryNodes: (...uids: string[]) => void; projectContext: TProjectContext; action: TFileActionType; fileTree: TFileNodeTreeData; diff --git a/src/components/main/actionsPanel/workspaceTreeView/hooks/useNodeActionsHandler.ts b/src/components/main/actionsPanel/workspaceTreeView/hooks/useNodeActionsHandler.ts index 62991771..71ce8c19 100644 --- a/src/components/main/actionsPanel/workspaceTreeView/hooks/useNodeActionsHandler.ts +++ b/src/components/main/actionsPanel/workspaceTreeView/hooks/useNodeActionsHandler.ts @@ -301,7 +301,9 @@ export const useNodeActionsHandler = ({ if (uids.length === 0) return; const message = `Are you sure you want to delete them? This action cannot be undone!`; - triggerAlert(message); + if (!window.confirm(message)) { + return; + } addRunningActions(["fileTreeView-delete"]); addInvalidNodes(...uids); @@ -325,10 +327,10 @@ export const useNodeActionsHandler = ({ removeInvalidNodes(...uids); removeRunningActions(["fileTreeView-delete"]); }, [ - addRunningActions, - removeRunningActions, selectedItems, invalidNodes, + addRunningActions, + removeRunningActions, addInvalidNodes, removeInvalidNodes, project,