Skip to content

Build your personal knowledge base with Trilium Notes

client/deleted notes add key binding support

Adorian Doran29419d3188fe
diff --git a/apps/client/src/services/command_registry.spec.ts b/apps/client/src/services/command_registry.spec.ts
index dc31b5c6da..14e769b0a1 100644
--- a/apps/client/src/services/command_registry.spec.ts
+++ b/apps/client/src/services/command_registry.spec.ts
@@ -91,8 +91,7 @@ describe("CommandRegistry default commands", () => {
"search-notes",
"search-in-subtree",
"show-search-history",
- "show-launch-bar",
- "show-deleted-notes"
+ "show-launch-bar"
])
);
// getAllCommands returns a name-sorted list.
@@ -123,9 +122,6 @@ describe("CommandRegistry default commands", () => {
await registry.executeCommand("show-launch-bar");
expect(triggerCommand).toHaveBeenCalledWith("showLaunchBarSubtree");
-
- await registry.executeCommand("show-deleted-notes");
- expect(triggerCommand).toHaveBeenCalledWith("showDeletedNotes");
});
it("export-note and search-in-subtree skip triggering when there is no active note path", async () => {
diff --git a/apps/client/src/services/command_registry.ts b/apps/client/src/services/command_registry.ts
index 0dc75b8e46..5ad87458b2 100644
--- a/apps/client/src/services/command_registry.ts
+++ b/apps/client/src/services/command_registry.ts
@@ -96,14 +96,6 @@ export class CommandRegistry {
handler: () => appContext.triggerCommand("showLaunchBarSubtree")
});
- this.register({
- id: "show-deleted-notes",
- name: t("command_palette.show_deleted_notes_title"),
- description: t("command_palette.show_deleted_notes_description"),
- icon: "bx bx-trash-alt",
- handler: () => appContext.triggerCommand("showDeletedNotes")
- });
-
this.register({
id: "pin-active-tab",
name: t("command_palette.pin_tab_title"),
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index d183abc1a2..d8d6f83526 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -2659,8 +2659,6 @@
"search_history_description": "View previous searches",
"configure_launch_bar_title": "Configure Launch Bar",
"configure_launch_bar_description": "Open the launch bar configuration, to add or remove items.",
- "show_deleted_notes_title": "Show Deleted Notes",
- "show_deleted_notes_description": "View and restore recently deleted notes",
"pin_tab_title": "Pin Tab",
"pin_tab_description": "Always keep this note open in this tab at the start of the tab bar and prevent it from being accidentally closed",
"unpin_tab_title": "Unpin Tab",
diff --git a/apps/server/src/assets/translations/en/server.json b/apps/server/src/assets/translations/en/server.json
index 00c2c9ae54..ccfab64356 100644
--- a/apps/server/src/assets/translations/en/server.json
+++ b/apps/server/src/assets/translations/en/server.json
@@ -35,6 +35,7 @@
"show-options": "Open \"Options\" page",
"show-revisions": "Show \"Note Revisions\" dialog",
"show-recent-changes": "Show \"Recent Changes\" dialog",
+ "show-deleted-notes": "Show \"Deleted Notes\" dialog",
"show-sql-console": "Open \"SQL Console\" page",
"show-backend-log": "Open \"Backend Log\" page",
"show-help": "Open the built-in User Guide",
@@ -123,6 +124,7 @@
"show-options": "Show Options",
"show-revisions": "Show Revisions",
"show-recent-changes": "Show Recent Changes",
+ "show-deleted-notes": "Show Deleted Notes",
"show-sql-console": "Show SQL Console",
"show-backend-log": "Show Backend Log",
"show-help": "Show Help",
diff --git a/packages/commons/src/lib/keyboard_actions_interface.ts b/packages/commons/src/lib/keyboard_actions_interface.ts
index 81f1f3855c..3ca128df4d 100644
--- a/packages/commons/src/lib/keyboard_actions_interface.ts
+++ b/packages/commons/src/lib/keyboard_actions_interface.ts
@@ -53,6 +53,7 @@ const enum KeyboardActionNamesEnum {
showOptions,
showRevisions,
showRecentChanges,
+ showDeletedNotes,
showSQLConsole,
showBackendLog,
showCheatsheet,
diff --git a/packages/trilium-core/src/services/keyboard_actions.ts b/packages/trilium-core/src/services/keyboard_actions.ts
index 323051c859..a484226f68 100644
--- a/packages/trilium-core/src/services/keyboard_actions.ts
+++ b/packages/trilium-core/src/services/keyboard_actions.ts
@@ -448,6 +448,14 @@ function getDefaultKeyboardActions() {
description: t("keyboard_actions.show-recent-changes"),
scope: "window"
},
+ {
+ friendlyName: t("keyboard_action_names.show-deleted-notes"),
+ actionName: "showDeletedNotes",
+ iconClass: "bx bx-trash-alt",
+ defaultShortcuts: [],
+ description: t("keyboard_actions.show-deleted-notes"),
+ scope: "window"
+ },
{
friendlyName: t("keyboard_action_names.show-sql-console"),
actionName: "showSQLConsole",