Skip to content

Commit

Permalink
Add 'Shift + Delete' shortcut for permanent file deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
hbl917070 committed Nov 2, 2024
1 parent e303438 commit 29be113
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Www/ts/MainWindow/FileLoad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,7 @@ export class FileLoad {
}
}

// 刪除前顯示詢問視窗
if (M.config.settings.other.fileDeletingShowCheckMsg) {
M.msgbox.show({
type: "radio",
Expand All @@ -1069,11 +1070,10 @@ export class FileLoad {
await runDelete(value);
}
});

} else {

}
// 不顯示詢問視窗直接執行
else {
await runDelete(newType);

}

}
Expand Down
6 changes: 5 additions & 1 deletion Www/ts/MainWindow/Hotkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,11 @@ export class Hotkey {
M.script.fileLoad.showRenameMsg();
}
if (e.code === "Delete") {
M.script.fileLoad.showDeleteFileMsg();
if (e.shiftKey) {
M.script.fileLoad.showDeleteFileMsg("delete"); // 永久刪除
} else {
M.script.fileLoad.showDeleteFileMsg("moveToRecycle"); // 移到回收筒
}
}
if (e.code === "KeyO") {
M.script.open.revealInFileExplorer();
Expand Down

0 comments on commit 29be113

Please sign in to comment.