mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 23:29:02 +02:00
feat(command_palette): remove duplicate actions
This commit is contained in:
parent
237a4e9a74
commit
6915993a35
@ -28,41 +28,6 @@ class CommandRegistry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private registerDefaultCommands() {
|
private registerDefaultCommands() {
|
||||||
// Keep only commands with custom handlers or better descriptions
|
|
||||||
this.register({
|
|
||||||
id: "toggle-left-pane",
|
|
||||||
name: "Toggle Left Pane",
|
|
||||||
description: "Show/hide the note tree sidebar",
|
|
||||||
icon: "bx bx-sidebar",
|
|
||||||
handler: () => appContext.triggerCommand("toggleLeftPane")
|
|
||||||
});
|
|
||||||
|
|
||||||
this.register({
|
|
||||||
id: "show-options",
|
|
||||||
name: "Show Options",
|
|
||||||
description: "Open settings/preferences",
|
|
||||||
icon: "bx bx-cog",
|
|
||||||
commandName: "showOptions",
|
|
||||||
aliases: ["settings", "preferences"]
|
|
||||||
});
|
|
||||||
|
|
||||||
this.register({
|
|
||||||
id: "show-help",
|
|
||||||
name: "Show Help",
|
|
||||||
description: "Open help documentation",
|
|
||||||
icon: "bx bx-help-circle",
|
|
||||||
handler: () => appContext.triggerCommand("showHelp")
|
|
||||||
});
|
|
||||||
|
|
||||||
// Special commands with custom handlers
|
|
||||||
this.register({
|
|
||||||
id: "show-sql-console",
|
|
||||||
name: "Show SQL Console",
|
|
||||||
description: "Open SQL console page",
|
|
||||||
icon: "bx bx-data",
|
|
||||||
commandName: "showSQLConsole"
|
|
||||||
});
|
|
||||||
|
|
||||||
this.register({
|
this.register({
|
||||||
id: "export-note",
|
id: "export-note",
|
||||||
name: "Export Note",
|
name: "Export Note",
|
||||||
@ -79,14 +44,6 @@ class CommandRegistry {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.register({
|
|
||||||
id: "show-note-source",
|
|
||||||
name: "Show Note Source",
|
|
||||||
description: "View note in source mode",
|
|
||||||
icon: "bx bx-code",
|
|
||||||
handler: () => appContext.triggerCommand("showNoteSource")
|
|
||||||
});
|
|
||||||
|
|
||||||
this.register({
|
this.register({
|
||||||
id: "show-attachments",
|
id: "show-attachments",
|
||||||
name: "Show Attachments",
|
name: "Show Attachments",
|
||||||
@ -125,27 +82,11 @@ class CommandRegistry {
|
|||||||
handler: () => appContext.triggerCommand("showSearchHistory")
|
handler: () => appContext.triggerCommand("showSearchHistory")
|
||||||
});
|
});
|
||||||
|
|
||||||
this.register({
|
|
||||||
id: "show-backend-log",
|
|
||||||
name: "Show Backend Log",
|
|
||||||
description: "View server logs",
|
|
||||||
icon: "bx bx-terminal",
|
|
||||||
handler: () => appContext.triggerCommand("showBackendLog")
|
|
||||||
});
|
|
||||||
|
|
||||||
this.register({
|
|
||||||
id: "show-recent-changes",
|
|
||||||
name: "Show Recent Changes",
|
|
||||||
description: "View recently modified notes",
|
|
||||||
icon: "bx bx-time",
|
|
||||||
handler: () => appContext.triggerCommand("showRecentChanges", { ancestorNoteId: "root" })
|
|
||||||
});
|
|
||||||
|
|
||||||
this.register({
|
this.register({
|
||||||
id: "show-launch-bar",
|
id: "show-launch-bar",
|
||||||
name: "Show Launch Bar",
|
name: "Configure Launch Bar",
|
||||||
description: "Open the launch bar subtree",
|
description: "Open the launch bar configuration, to add or remove items.",
|
||||||
icon: "bx bx-grid-alt",
|
icon: "bx bx-sidebar",
|
||||||
handler: () => appContext.triggerCommand("showLaunchBarSubtree")
|
handler: () => appContext.triggerCommand("showLaunchBarSubtree")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user