feat(command_palette): add icons to all actions

This commit is contained in:
Elian Doran 2025-07-27 17:41:00 +03:00
parent d10bbdd7a7
commit 3517715aab
No known key found for this signature in database
3 changed files with 105 additions and 5 deletions

View File

@ -51,11 +51,11 @@ class CommandRegistry {
// Special commands with custom handlers // Special commands with custom handlers
this.register({ this.register({
id: "create-sql-console", id: "show-sql-console",
name: "Create SQL Console", name: "Show SQL Console",
description: "Create a new SQL console note", description: "Open SQL console page",
icon: "bx bx-data", icon: "bx bx-data",
handler: () => appContext.triggerCommand("showSQLConsole") commandName: "showSQLConsole"
}); });
this.register({ this.register({
@ -174,7 +174,7 @@ class CommandRegistry {
id: action.actionName, id: action.actionName,
name: action.friendlyName, name: action.friendlyName,
description: action.description, description: action.description,
icon: this.getIconForAction(action.actionName), icon: action.iconClass || this.getIconForAction(action.actionName),
shortcut: primaryShortcut ? this.formatShortcut(primaryShortcut) : undefined, shortcut: primaryShortcut ? this.formatShortcut(primaryShortcut) : undefined,
commandName: action.actionName as CommandNames, commandName: action.actionName as CommandNames,
source: "keyboard-action" source: "keyboard-action"

View File

@ -18,6 +18,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "backInNoteHistory", actionName: "backInNoteHistory",
friendlyName: t("keyboard_action_names.back-in-note-history"), friendlyName: t("keyboard_action_names.back-in-note-history"),
iconClass: "bx bxs-chevron-left",
// Mac has a different history navigation shortcuts - https://github.com/zadam/trilium/issues/376 // Mac has a different history navigation shortcuts - https://github.com/zadam/trilium/issues/376
defaultShortcuts: isMac ? ["CommandOrControl+Left"] : ["Alt+Left"], defaultShortcuts: isMac ? ["CommandOrControl+Left"] : ["Alt+Left"],
description: t("keyboard_actions.back-in-note-history"), description: t("keyboard_actions.back-in-note-history"),
@ -26,6 +27,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "forwardInNoteHistory", actionName: "forwardInNoteHistory",
friendlyName: t("keyboard_action_names.forward-in-note-history"), friendlyName: t("keyboard_action_names.forward-in-note-history"),
iconClass: "bx bxs-chevron-right",
// Mac has a different history navigation shortcuts - https://github.com/zadam/trilium/issues/376 // Mac has a different history navigation shortcuts - https://github.com/zadam/trilium/issues/376
defaultShortcuts: isMac ? ["CommandOrControl+Right"] : ["Alt+Right"], defaultShortcuts: isMac ? ["CommandOrControl+Right"] : ["Alt+Right"],
description: t("keyboard_actions.forward-in-note-history"), description: t("keyboard_actions.forward-in-note-history"),
@ -34,6 +36,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "jumpToNote", actionName: "jumpToNote",
friendlyName: t("keyboard_action_names.jump-to-note"), friendlyName: t("keyboard_action_names.jump-to-note"),
iconClass: "bx bx-send",
defaultShortcuts: ["CommandOrControl+J"], defaultShortcuts: ["CommandOrControl+J"],
description: t("keyboard_actions.open-jump-to-note-dialog"), description: t("keyboard_actions.open-jump-to-note-dialog"),
scope: "window" scope: "window"
@ -41,6 +44,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "commandPalette", actionName: "commandPalette",
friendlyName: t("keyboard_action_names.command-palette"), friendlyName: t("keyboard_action_names.command-palette"),
iconClass: "bx bx-terminal",
defaultShortcuts: ["CommandOrControl+Shift+J"], defaultShortcuts: ["CommandOrControl+Shift+J"],
description: t("keyboard_actions.open-command-palette"), description: t("keyboard_actions.open-command-palette"),
scope: "window" scope: "window"
@ -49,12 +53,14 @@ function getDefaultKeyboardActions() {
actionName: "scrollToActiveNote", actionName: "scrollToActiveNote",
friendlyName: t("keyboard_action_names.scroll-to-active-note"), friendlyName: t("keyboard_action_names.scroll-to-active-note"),
defaultShortcuts: ["CommandOrControl+."], defaultShortcuts: ["CommandOrControl+."],
iconClass: "bx bx-current-location",
description: t("keyboard_actions.scroll-to-active-note"), description: t("keyboard_actions.scroll-to-active-note"),
scope: "window" scope: "window"
}, },
{ {
actionName: "quickSearch", actionName: "quickSearch",
friendlyName: t("keyboard_action_names.quick-search"), friendlyName: t("keyboard_action_names.quick-search"),
iconClass: "bx bx-search",
defaultShortcuts: ["CommandOrControl+S"], defaultShortcuts: ["CommandOrControl+S"],
description: t("keyboard_actions.quick-search"), description: t("keyboard_actions.quick-search"),
scope: "window" scope: "window"
@ -63,6 +69,7 @@ function getDefaultKeyboardActions() {
actionName: "searchInSubtree", actionName: "searchInSubtree",
friendlyName: t("keyboard_action_names.search-in-subtree"), friendlyName: t("keyboard_action_names.search-in-subtree"),
defaultShortcuts: ["CommandOrControl+Shift+S"], defaultShortcuts: ["CommandOrControl+Shift+S"],
iconClass: "bx bx-search-alt",
description: t("keyboard_actions.search-in-subtree"), description: t("keyboard_actions.search-in-subtree"),
scope: "note-tree" scope: "note-tree"
}, },
@ -70,6 +77,7 @@ function getDefaultKeyboardActions() {
actionName: "expandSubtree", actionName: "expandSubtree",
friendlyName: t("keyboard_action_names.expand-subtree"), friendlyName: t("keyboard_action_names.expand-subtree"),
defaultShortcuts: [], defaultShortcuts: [],
iconClass: "bx bx-layer-plus",
description: t("keyboard_actions.expand-subtree"), description: t("keyboard_actions.expand-subtree"),
scope: "note-tree" scope: "note-tree"
}, },
@ -77,12 +85,14 @@ function getDefaultKeyboardActions() {
actionName: "collapseTree", actionName: "collapseTree",
friendlyName: t("keyboard_action_names.collapse-tree"), friendlyName: t("keyboard_action_names.collapse-tree"),
defaultShortcuts: ["Alt+C"], defaultShortcuts: ["Alt+C"],
iconClass: "bx bx-layer-minus",
description: t("keyboard_actions.collapse-tree"), description: t("keyboard_actions.collapse-tree"),
scope: "window" scope: "window"
}, },
{ {
actionName: "collapseSubtree", actionName: "collapseSubtree",
friendlyName: t("keyboard_action_names.collapse-subtree"), friendlyName: t("keyboard_action_names.collapse-subtree"),
iconClass: "bx bxs-layer-minus",
defaultShortcuts: ["Alt+-"], defaultShortcuts: ["Alt+-"],
description: t("keyboard_actions.collapse-subtree"), description: t("keyboard_actions.collapse-subtree"),
scope: "note-tree" scope: "note-tree"
@ -90,6 +100,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "sortChildNotes", actionName: "sortChildNotes",
friendlyName: t("keyboard_action_names.sort-child-notes"), friendlyName: t("keyboard_action_names.sort-child-notes"),
iconClass: "bx bx-sort-down",
defaultShortcuts: ["Alt+S"], defaultShortcuts: ["Alt+S"],
description: t("keyboard_actions.sort-child-notes"), description: t("keyboard_actions.sort-child-notes"),
scope: "note-tree" scope: "note-tree"
@ -101,6 +112,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "createNoteAfter", actionName: "createNoteAfter",
friendlyName: t("keyboard_action_names.create-note-after"), friendlyName: t("keyboard_action_names.create-note-after"),
iconClass: "bx bx-plus",
defaultShortcuts: ["CommandOrControl+O"], defaultShortcuts: ["CommandOrControl+O"],
description: t("keyboard_actions.create-note-after"), description: t("keyboard_actions.create-note-after"),
scope: "window" scope: "window"
@ -108,6 +120,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "createNoteInto", actionName: "createNoteInto",
friendlyName: t("keyboard_action_names.create-note-into"), friendlyName: t("keyboard_action_names.create-note-into"),
iconClass: "bx bx-plus",
defaultShortcuts: ["CommandOrControl+P"], defaultShortcuts: ["CommandOrControl+P"],
description: t("keyboard_actions.create-note-into"), description: t("keyboard_actions.create-note-into"),
scope: "window" scope: "window"
@ -115,6 +128,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "createNoteIntoInbox", actionName: "createNoteIntoInbox",
friendlyName: t("keyboard_action_names.create-note-into-inbox"), friendlyName: t("keyboard_action_names.create-note-into-inbox"),
iconClass: "bx bx-inbox",
defaultShortcuts: ["global:CommandOrControl+Alt+P"], defaultShortcuts: ["global:CommandOrControl+Alt+P"],
description: t("keyboard_actions.create-note-into-inbox"), description: t("keyboard_actions.create-note-into-inbox"),
scope: "window" scope: "window"
@ -122,6 +136,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "deleteNotes", actionName: "deleteNotes",
friendlyName: t("keyboard_action_names.delete-notes"), friendlyName: t("keyboard_action_names.delete-notes"),
iconClass: "bx bx-trash",
defaultShortcuts: ["Delete"], defaultShortcuts: ["Delete"],
description: t("keyboard_actions.delete-note"), description: t("keyboard_actions.delete-note"),
scope: "note-tree" scope: "note-tree"
@ -129,6 +144,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "moveNoteUp", actionName: "moveNoteUp",
friendlyName: t("keyboard_action_names.move-note-up"), friendlyName: t("keyboard_action_names.move-note-up"),
iconClass: "bx bx-up-arrow-alt",
defaultShortcuts: isMac ? ["Alt+Up"] : ["CommandOrControl+Up"], defaultShortcuts: isMac ? ["Alt+Up"] : ["CommandOrControl+Up"],
description: t("keyboard_actions.move-note-up"), description: t("keyboard_actions.move-note-up"),
scope: "note-tree" scope: "note-tree"
@ -136,6 +152,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "moveNoteDown", actionName: "moveNoteDown",
friendlyName: t("keyboard_action_names.move-note-down"), friendlyName: t("keyboard_action_names.move-note-down"),
iconClass: "bx bx-down-arrow-alt",
defaultShortcuts: isMac ? ["Alt+Down"] : ["CommandOrControl+Down"], defaultShortcuts: isMac ? ["Alt+Down"] : ["CommandOrControl+Down"],
description: t("keyboard_actions.move-note-down"), description: t("keyboard_actions.move-note-down"),
scope: "note-tree" scope: "note-tree"
@ -143,6 +160,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "moveNoteUpInHierarchy", actionName: "moveNoteUpInHierarchy",
friendlyName: t("keyboard_action_names.move-note-up-in-hierarchy"), friendlyName: t("keyboard_action_names.move-note-up-in-hierarchy"),
iconClass: "bx bx-arrow-from-bottom",
defaultShortcuts: isMac ? ["Alt+Left"] : ["CommandOrControl+Left"], defaultShortcuts: isMac ? ["Alt+Left"] : ["CommandOrControl+Left"],
description: t("keyboard_actions.move-note-up-in-hierarchy"), description: t("keyboard_actions.move-note-up-in-hierarchy"),
scope: "note-tree" scope: "note-tree"
@ -150,6 +168,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "moveNoteDownInHierarchy", actionName: "moveNoteDownInHierarchy",
friendlyName: t("keyboard_action_names.move-note-down-in-hierarchy"), friendlyName: t("keyboard_action_names.move-note-down-in-hierarchy"),
iconClass: "bx bx-arrow-from-top",
defaultShortcuts: isMac ? ["Alt+Right"] : ["CommandOrControl+Right"], defaultShortcuts: isMac ? ["Alt+Right"] : ["CommandOrControl+Right"],
description: t("keyboard_actions.move-note-down-in-hierarchy"), description: t("keyboard_actions.move-note-down-in-hierarchy"),
scope: "note-tree" scope: "note-tree"
@ -157,6 +176,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "editNoteTitle", actionName: "editNoteTitle",
friendlyName: t("keyboard_action_names.edit-note-title"), friendlyName: t("keyboard_action_names.edit-note-title"),
iconClass: "bx bx-rename",
defaultShortcuts: ["Enter"], defaultShortcuts: ["Enter"],
description: t("keyboard_actions.edit-note-title"), description: t("keyboard_actions.edit-note-title"),
scope: "note-tree" scope: "note-tree"
@ -164,6 +184,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "editBranchPrefix", actionName: "editBranchPrefix",
friendlyName: t("keyboard_action_names.edit-branch-prefix"), friendlyName: t("keyboard_action_names.edit-branch-prefix"),
iconClass: "bx bx-rename",
defaultShortcuts: ["F2"], defaultShortcuts: ["F2"],
description: t("keyboard_actions.edit-branch-prefix"), description: t("keyboard_actions.edit-branch-prefix"),
scope: "note-tree" scope: "note-tree"
@ -171,6 +192,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "cloneNotesTo", actionName: "cloneNotesTo",
friendlyName: t("keyboard_action_names.clone-notes-to"), friendlyName: t("keyboard_action_names.clone-notes-to"),
iconClass: "bx bx-duplicate",
defaultShortcuts: ["CommandOrControl+Shift+C"], defaultShortcuts: ["CommandOrControl+Shift+C"],
description: t("keyboard_actions.clone-notes-to"), description: t("keyboard_actions.clone-notes-to"),
scope: "window" scope: "window"
@ -178,6 +200,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "moveNotesTo", actionName: "moveNotesTo",
friendlyName: t("keyboard_action_names.move-notes-to"), friendlyName: t("keyboard_action_names.move-notes-to"),
iconClass: "bx bx-transfer",
defaultShortcuts: ["CommandOrControl+Shift+X"], defaultShortcuts: ["CommandOrControl+Shift+X"],
description: t("keyboard_actions.move-notes-to"), description: t("keyboard_actions.move-notes-to"),
scope: "window" scope: "window"
@ -190,6 +213,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "copyNotesToClipboard", actionName: "copyNotesToClipboard",
friendlyName: t("keyboard_action_names.copy-notes-to-clipboard"), friendlyName: t("keyboard_action_names.copy-notes-to-clipboard"),
iconClass: "bx bx-copy",
defaultShortcuts: ["CommandOrControl+C"], defaultShortcuts: ["CommandOrControl+C"],
description: t("keyboard_actions.copy-notes-to-clipboard"), description: t("keyboard_actions.copy-notes-to-clipboard"),
scope: "note-tree" scope: "note-tree"
@ -197,6 +221,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "pasteNotesFromClipboard", actionName: "pasteNotesFromClipboard",
friendlyName: t("keyboard_action_names.paste-notes-from-clipboard"), friendlyName: t("keyboard_action_names.paste-notes-from-clipboard"),
iconClass: "bx bx-paste",
defaultShortcuts: ["CommandOrControl+V"], defaultShortcuts: ["CommandOrControl+V"],
description: t("keyboard_actions.paste-notes-from-clipboard"), description: t("keyboard_actions.paste-notes-from-clipboard"),
scope: "note-tree" scope: "note-tree"
@ -204,6 +229,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "cutNotesToClipboard", actionName: "cutNotesToClipboard",
friendlyName: t("keyboard_action_names.cut-notes-to-clipboard"), friendlyName: t("keyboard_action_names.cut-notes-to-clipboard"),
iconClass: "bx bx-cut",
defaultShortcuts: ["CommandOrControl+X"], defaultShortcuts: ["CommandOrControl+X"],
description: t("keyboard_actions.cut-notes-to-clipboard"), description: t("keyboard_actions.cut-notes-to-clipboard"),
scope: "note-tree" scope: "note-tree"
@ -211,6 +237,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "selectAllNotesInParent", actionName: "selectAllNotesInParent",
friendlyName: t("keyboard_action_names.select-all-notes-in-parent"), friendlyName: t("keyboard_action_names.select-all-notes-in-parent"),
iconClass: "bx bx-select-multiple",
defaultShortcuts: ["CommandOrControl+A"], defaultShortcuts: ["CommandOrControl+A"],
description: t("keyboard_actions.select-all-notes-in-parent"), description: t("keyboard_actions.select-all-notes-in-parent"),
scope: "note-tree" scope: "note-tree"
@ -218,6 +245,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "addNoteAboveToSelection", actionName: "addNoteAboveToSelection",
friendlyName: t("keyboard_action_names.add-note-above-to-selection"), friendlyName: t("keyboard_action_names.add-note-above-to-selection"),
iconClass: "bx bx-chevron-up-square",
defaultShortcuts: ["Shift+Up"], defaultShortcuts: ["Shift+Up"],
description: t("keyboard_actions.add-note-above-to-the-selection"), description: t("keyboard_actions.add-note-above-to-the-selection"),
scope: "note-tree" scope: "note-tree"
@ -225,6 +253,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "addNoteBelowToSelection", actionName: "addNoteBelowToSelection",
friendlyName: t("keyboard_action_names.add-note-below-to-selection"), friendlyName: t("keyboard_action_names.add-note-below-to-selection"),
iconClass: "bx bx-chevron-down-square",
defaultShortcuts: ["Shift+Down"], defaultShortcuts: ["Shift+Down"],
description: t("keyboard_actions.add-note-below-to-selection"), description: t("keyboard_actions.add-note-below-to-selection"),
scope: "note-tree" scope: "note-tree"
@ -232,6 +261,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "duplicateSubtree", actionName: "duplicateSubtree",
friendlyName: t("keyboard_action_names.duplicate-subtree"), friendlyName: t("keyboard_action_names.duplicate-subtree"),
iconClass: "bx bx-outline",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.duplicate-subtree"), description: t("keyboard_actions.duplicate-subtree"),
scope: "note-tree" scope: "note-tree"
@ -243,6 +273,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "openNewTab", actionName: "openNewTab",
friendlyName: t("keyboard_action_names.open-new-tab"), friendlyName: t("keyboard_action_names.open-new-tab"),
iconClass: "bx bx-plus",
defaultShortcuts: isElectron ? ["CommandOrControl+T"] : [], defaultShortcuts: isElectron ? ["CommandOrControl+T"] : [],
description: t("keyboard_actions.open-new-tab"), description: t("keyboard_actions.open-new-tab"),
scope: "window" scope: "window"
@ -250,6 +281,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "closeActiveTab", actionName: "closeActiveTab",
friendlyName: t("keyboard_action_names.close-active-tab"), friendlyName: t("keyboard_action_names.close-active-tab"),
iconClass: "bx bx-minus",
defaultShortcuts: isElectron ? ["CommandOrControl+W"] : [], defaultShortcuts: isElectron ? ["CommandOrControl+W"] : [],
description: t("keyboard_actions.close-active-tab"), description: t("keyboard_actions.close-active-tab"),
scope: "window" scope: "window"
@ -257,6 +289,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "reopenLastTab", actionName: "reopenLastTab",
friendlyName: t("keyboard_action_names.reopen-last-tab"), friendlyName: t("keyboard_action_names.reopen-last-tab"),
iconClass: "bx bx-undo",
defaultShortcuts: isElectron ? ["CommandOrControl+Shift+T"] : [], defaultShortcuts: isElectron ? ["CommandOrControl+Shift+T"] : [],
description: t("keyboard_actions.reopen-last-tab"), description: t("keyboard_actions.reopen-last-tab"),
scope: "window" scope: "window"
@ -264,6 +297,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "activateNextTab", actionName: "activateNextTab",
friendlyName: t("keyboard_action_names.activate-next-tab"), friendlyName: t("keyboard_action_names.activate-next-tab"),
iconClass: "bx bx-skip-next",
defaultShortcuts: isElectron ? ["CommandOrControl+Tab", "CommandOrControl+PageDown"] : [], defaultShortcuts: isElectron ? ["CommandOrControl+Tab", "CommandOrControl+PageDown"] : [],
description: t("keyboard_actions.activate-next-tab"), description: t("keyboard_actions.activate-next-tab"),
scope: "window" scope: "window"
@ -271,6 +305,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "activatePreviousTab", actionName: "activatePreviousTab",
friendlyName: t("keyboard_action_names.activate-previous-tab"), friendlyName: t("keyboard_action_names.activate-previous-tab"),
iconClass: "bx bx-skip-previous",
defaultShortcuts: isElectron ? ["CommandOrControl+Shift+Tab", "CommandOrControl+PageUp"] : [], defaultShortcuts: isElectron ? ["CommandOrControl+Shift+Tab", "CommandOrControl+PageUp"] : [],
description: t("keyboard_actions.activate-previous-tab"), description: t("keyboard_actions.activate-previous-tab"),
scope: "window" scope: "window"
@ -278,6 +313,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "openNewWindow", actionName: "openNewWindow",
friendlyName: t("keyboard_action_names.open-new-window"), friendlyName: t("keyboard_action_names.open-new-window"),
iconClass: "bx bx-window-open",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.open-new-window"), description: t("keyboard_actions.open-new-window"),
scope: "window" scope: "window"
@ -285,6 +321,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "toggleTray", actionName: "toggleTray",
friendlyName: t("keyboard_action_names.toggle-system-tray-icon"), friendlyName: t("keyboard_action_names.toggle-system-tray-icon"),
iconClass: "bx bx-show",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.toggle-tray"), description: t("keyboard_actions.toggle-tray"),
scope: "window" scope: "window"
@ -292,6 +329,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "toggleZenMode", actionName: "toggleZenMode",
friendlyName: t("keyboard_action_names.toggle-zen-mode"), friendlyName: t("keyboard_action_names.toggle-zen-mode"),
iconClass: "bx bxs-yin-yang",
defaultShortcuts: ["F9"], defaultShortcuts: ["F9"],
description: t("keyboard_actions.toggle-zen-mode"), description: t("keyboard_actions.toggle-zen-mode"),
scope: "window" scope: "window"
@ -299,6 +337,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "firstTab", actionName: "firstTab",
friendlyName: t("keyboard_action_names.switch-to-first-tab"), friendlyName: t("keyboard_action_names.switch-to-first-tab"),
iconClass: "bx bx-rectangle",
defaultShortcuts: ["CommandOrControl+1"], defaultShortcuts: ["CommandOrControl+1"],
description: t("keyboard_actions.first-tab"), description: t("keyboard_actions.first-tab"),
scope: "window" scope: "window"
@ -306,6 +345,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "secondTab", actionName: "secondTab",
friendlyName: t("keyboard_action_names.switch-to-second-tab"), friendlyName: t("keyboard_action_names.switch-to-second-tab"),
iconClass: "bx bx-rectangle",
defaultShortcuts: ["CommandOrControl+2"], defaultShortcuts: ["CommandOrControl+2"],
description: t("keyboard_actions.second-tab"), description: t("keyboard_actions.second-tab"),
scope: "window" scope: "window"
@ -313,6 +353,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "thirdTab", actionName: "thirdTab",
friendlyName: t("keyboard_action_names.switch-to-third-tab"), friendlyName: t("keyboard_action_names.switch-to-third-tab"),
iconClass: "bx bx-rectangle",
defaultShortcuts: ["CommandOrControl+3"], defaultShortcuts: ["CommandOrControl+3"],
description: t("keyboard_actions.third-tab"), description: t("keyboard_actions.third-tab"),
scope: "window" scope: "window"
@ -320,6 +361,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "fourthTab", actionName: "fourthTab",
friendlyName: t("keyboard_action_names.switch-to-fourth-tab"), friendlyName: t("keyboard_action_names.switch-to-fourth-tab"),
iconClass: "bx bx-rectangle",
defaultShortcuts: ["CommandOrControl+4"], defaultShortcuts: ["CommandOrControl+4"],
description: t("keyboard_actions.fourth-tab"), description: t("keyboard_actions.fourth-tab"),
scope: "window" scope: "window"
@ -327,6 +369,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "fifthTab", actionName: "fifthTab",
friendlyName: t("keyboard_action_names.switch-to-fifth-tab"), friendlyName: t("keyboard_action_names.switch-to-fifth-tab"),
iconClass: "bx bx-rectangle",
defaultShortcuts: ["CommandOrControl+5"], defaultShortcuts: ["CommandOrControl+5"],
description: t("keyboard_actions.fifth-tab"), description: t("keyboard_actions.fifth-tab"),
scope: "window" scope: "window"
@ -334,6 +377,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "sixthTab", actionName: "sixthTab",
friendlyName: t("keyboard_action_names.switch-to-sixth-tab"), friendlyName: t("keyboard_action_names.switch-to-sixth-tab"),
iconClass: "bx bx-rectangle",
defaultShortcuts: ["CommandOrControl+6"], defaultShortcuts: ["CommandOrControl+6"],
description: t("keyboard_actions.sixth-tab"), description: t("keyboard_actions.sixth-tab"),
scope: "window" scope: "window"
@ -341,6 +385,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "seventhTab", actionName: "seventhTab",
friendlyName: t("keyboard_action_names.switch-to-seventh-tab"), friendlyName: t("keyboard_action_names.switch-to-seventh-tab"),
iconClass: "bx bx-rectangle",
defaultShortcuts: ["CommandOrControl+7"], defaultShortcuts: ["CommandOrControl+7"],
description: t("keyboard_actions.seventh-tab"), description: t("keyboard_actions.seventh-tab"),
scope: "window" scope: "window"
@ -348,6 +393,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "eigthTab", actionName: "eigthTab",
friendlyName: t("keyboard_action_names.switch-to-eighth-tab"), friendlyName: t("keyboard_action_names.switch-to-eighth-tab"),
iconClass: "bx bx-rectangle",
defaultShortcuts: ["CommandOrControl+8"], defaultShortcuts: ["CommandOrControl+8"],
description: t("keyboard_actions.eight-tab"), description: t("keyboard_actions.eight-tab"),
scope: "window" scope: "window"
@ -355,6 +401,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "ninthTab", actionName: "ninthTab",
friendlyName: t("keyboard_action_names.switch-to-ninth-tab"), friendlyName: t("keyboard_action_names.switch-to-ninth-tab"),
iconClass: "bx bx-rectangle",
defaultShortcuts: ["CommandOrControl+9"], defaultShortcuts: ["CommandOrControl+9"],
description: t("keyboard_actions.ninth-tab"), description: t("keyboard_actions.ninth-tab"),
scope: "window" scope: "window"
@ -362,6 +409,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "lastTab", actionName: "lastTab",
friendlyName: t("keyboard_action_names.switch-to-last-tab"), friendlyName: t("keyboard_action_names.switch-to-last-tab"),
iconClass: "bx bx-rectangle",
defaultShortcuts: ["CommandOrControl+0"], defaultShortcuts: ["CommandOrControl+0"],
description: t("keyboard_actions.last-tab"), description: t("keyboard_actions.last-tab"),
scope: "window" scope: "window"
@ -373,6 +421,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.show-note-source"), friendlyName: t("keyboard_action_names.show-note-source"),
actionName: "showNoteSource", actionName: "showNoteSource",
iconClass: "bx bx-code",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.show-note-source"), description: t("keyboard_actions.show-note-source"),
scope: "window" scope: "window"
@ -380,6 +429,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.show-options"), friendlyName: t("keyboard_action_names.show-options"),
actionName: "showOptions", actionName: "showOptions",
iconClass: "bx bx-cog",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.show-options"), description: t("keyboard_actions.show-options"),
scope: "window" scope: "window"
@ -387,6 +437,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.show-revisions"), friendlyName: t("keyboard_action_names.show-revisions"),
actionName: "showRevisions", actionName: "showRevisions",
iconClass: "bx bx-history",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.show-revisions"), description: t("keyboard_actions.show-revisions"),
scope: "window" scope: "window"
@ -394,6 +445,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.show-recent-changes"), friendlyName: t("keyboard_action_names.show-recent-changes"),
actionName: "showRecentChanges", actionName: "showRecentChanges",
iconClass: "bx bx-history",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.show-recent-changes"), description: t("keyboard_actions.show-recent-changes"),
scope: "window" scope: "window"
@ -401,6 +453,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.show-sql-console"), friendlyName: t("keyboard_action_names.show-sql-console"),
actionName: "showSQLConsole", actionName: "showSQLConsole",
iconClass: "bx bx-data",
defaultShortcuts: ["Alt+O"], defaultShortcuts: ["Alt+O"],
description: t("keyboard_actions.show-sql-console"), description: t("keyboard_actions.show-sql-console"),
scope: "window" scope: "window"
@ -408,6 +461,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.show-backend-log"), friendlyName: t("keyboard_action_names.show-backend-log"),
actionName: "showBackendLog", actionName: "showBackendLog",
iconClass: "bx bx-detail",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.show-backend-log"), description: t("keyboard_actions.show-backend-log"),
scope: "window" scope: "window"
@ -415,6 +469,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.show-help"), friendlyName: t("keyboard_action_names.show-help"),
actionName: "showHelp", actionName: "showHelp",
iconClass: "bx bx-help-circle",
defaultShortcuts: ["F1"], defaultShortcuts: ["F1"],
description: t("keyboard_actions.show-help"), description: t("keyboard_actions.show-help"),
scope: "window" scope: "window"
@ -422,6 +477,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.show-cheatsheet"), friendlyName: t("keyboard_action_names.show-cheatsheet"),
actionName: "showCheatsheet", actionName: "showCheatsheet",
iconClass: "bx bxs-keyboard",
defaultShortcuts: ["Shift+F1"], defaultShortcuts: ["Shift+F1"],
description: t("keyboard_actions.show-cheatsheet"), description: t("keyboard_actions.show-cheatsheet"),
scope: "window" scope: "window"
@ -434,6 +490,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.add-link-to-text"), friendlyName: t("keyboard_action_names.add-link-to-text"),
actionName: "addLinkToText", actionName: "addLinkToText",
iconClass: "bx bx-link",
defaultShortcuts: ["CommandOrControl+L"], defaultShortcuts: ["CommandOrControl+L"],
description: t("keyboard_actions.add-link-to-text"), description: t("keyboard_actions.add-link-to-text"),
scope: "text-detail" scope: "text-detail"
@ -441,6 +498,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.follow-link-under-cursor"), friendlyName: t("keyboard_action_names.follow-link-under-cursor"),
actionName: "followLinkUnderCursor", actionName: "followLinkUnderCursor",
iconClass: "bx bx-link-external",
defaultShortcuts: ["CommandOrControl+Enter"], defaultShortcuts: ["CommandOrControl+Enter"],
description: t("keyboard_actions.follow-link-under-cursor"), description: t("keyboard_actions.follow-link-under-cursor"),
scope: "text-detail" scope: "text-detail"
@ -448,6 +506,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.insert-date-and-time-to-text"), friendlyName: t("keyboard_action_names.insert-date-and-time-to-text"),
actionName: "insertDateTimeToText", actionName: "insertDateTimeToText",
iconClass: "bx bx-calendar-event",
defaultShortcuts: ["Alt+T"], defaultShortcuts: ["Alt+T"],
description: t("keyboard_actions.insert-date-and-time-to-text"), description: t("keyboard_actions.insert-date-and-time-to-text"),
scope: "text-detail" scope: "text-detail"
@ -455,6 +514,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.paste-markdown-into-text"), friendlyName: t("keyboard_action_names.paste-markdown-into-text"),
actionName: "pasteMarkdownIntoText", actionName: "pasteMarkdownIntoText",
iconClass: "bx bxl-markdown",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.paste-markdown-into-text"), description: t("keyboard_actions.paste-markdown-into-text"),
scope: "text-detail" scope: "text-detail"
@ -462,6 +522,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.cut-into-note"), friendlyName: t("keyboard_action_names.cut-into-note"),
actionName: "cutIntoNote", actionName: "cutIntoNote",
iconClass: "bx bx-cut",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.cut-into-note"), description: t("keyboard_actions.cut-into-note"),
scope: "text-detail" scope: "text-detail"
@ -469,6 +530,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.add-include-note-to-text"), friendlyName: t("keyboard_action_names.add-include-note-to-text"),
actionName: "addIncludeNoteToText", actionName: "addIncludeNoteToText",
iconClass: "bx bx-note",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.add-include-note-to-text"), description: t("keyboard_actions.add-include-note-to-text"),
scope: "text-detail" scope: "text-detail"
@ -476,6 +538,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.edit-read-only-note"), friendlyName: t("keyboard_action_names.edit-read-only-note"),
actionName: "editReadOnlyNote", actionName: "editReadOnlyNote",
iconClass: "bx bx-edit-alt",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.edit-readonly-note"), description: t("keyboard_actions.edit-readonly-note"),
scope: "window" scope: "window"
@ -488,6 +551,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.add-new-label"), friendlyName: t("keyboard_action_names.add-new-label"),
actionName: "addNewLabel", actionName: "addNewLabel",
iconClass: "bx bx-hash",
defaultShortcuts: ["Alt+L"], defaultShortcuts: ["Alt+L"],
description: t("keyboard_actions.add-new-label"), description: t("keyboard_actions.add-new-label"),
scope: "window" scope: "window"
@ -495,6 +559,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.add-new-relation"), friendlyName: t("keyboard_action_names.add-new-relation"),
actionName: "addNewRelation", actionName: "addNewRelation",
iconClass: "bx bx-transfer",
defaultShortcuts: ["Alt+R"], defaultShortcuts: ["Alt+R"],
description: t("keyboard_actions.create-new-relation"), description: t("keyboard_actions.create-new-relation"),
scope: "window" scope: "window"
@ -507,6 +572,7 @@ function getDefaultKeyboardActions() {
{ {
friendlyName: t("keyboard_action_names.toggle-ribbon-tab-classic-editor"), friendlyName: t("keyboard_action_names.toggle-ribbon-tab-classic-editor"),
actionName: "toggleRibbonTabClassicEditor", actionName: "toggleRibbonTabClassicEditor",
iconClass: "bx bx-text",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.toggle-classic-editor-toolbar"), description: t("keyboard_actions.toggle-classic-editor-toolbar"),
scope: "window" scope: "window"
@ -514,6 +580,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "toggleRibbonTabBasicProperties", actionName: "toggleRibbonTabBasicProperties",
friendlyName: t("keyboard_action_names.toggle-ribbon-tab-basic-properties"), friendlyName: t("keyboard_action_names.toggle-ribbon-tab-basic-properties"),
iconClass: "bx bx-slider",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.toggle-basic-properties"), description: t("keyboard_actions.toggle-basic-properties"),
scope: "window" scope: "window"
@ -521,6 +588,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "toggleRibbonTabBookProperties", actionName: "toggleRibbonTabBookProperties",
friendlyName: t("keyboard_action_names.toggle-ribbon-tab-book-properties"), friendlyName: t("keyboard_action_names.toggle-ribbon-tab-book-properties"),
iconClass: "bx bx-book",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.toggle-book-properties"), description: t("keyboard_actions.toggle-book-properties"),
scope: "window" scope: "window"
@ -528,6 +596,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "toggleRibbonTabFileProperties", actionName: "toggleRibbonTabFileProperties",
friendlyName: t("keyboard_action_names.toggle-ribbon-tab-file-properties"), friendlyName: t("keyboard_action_names.toggle-ribbon-tab-file-properties"),
iconClass: "bx bx-file",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.toggle-file-properties"), description: t("keyboard_actions.toggle-file-properties"),
scope: "window" scope: "window"
@ -535,6 +604,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "toggleRibbonTabImageProperties", actionName: "toggleRibbonTabImageProperties",
friendlyName: t("keyboard_action_names.toggle-ribbon-tab-image-properties"), friendlyName: t("keyboard_action_names.toggle-ribbon-tab-image-properties"),
iconClass: "bx bx-image",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.toggle-image-properties"), description: t("keyboard_actions.toggle-image-properties"),
scope: "window" scope: "window"
@ -542,6 +612,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "toggleRibbonTabOwnedAttributes", actionName: "toggleRibbonTabOwnedAttributes",
friendlyName: t("keyboard_action_names.toggle-ribbon-tab-owned-attributes"), friendlyName: t("keyboard_action_names.toggle-ribbon-tab-owned-attributes"),
iconClass: "bx bx-list-check",
defaultShortcuts: ["Alt+A"], defaultShortcuts: ["Alt+A"],
description: t("keyboard_actions.toggle-owned-attributes"), description: t("keyboard_actions.toggle-owned-attributes"),
scope: "window" scope: "window"
@ -549,6 +620,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "toggleRibbonTabInheritedAttributes", actionName: "toggleRibbonTabInheritedAttributes",
friendlyName: t("keyboard_action_names.toggle-ribbon-tab-inherited-attributes"), friendlyName: t("keyboard_action_names.toggle-ribbon-tab-inherited-attributes"),
iconClass: "bx bx-list-plus",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.toggle-inherited-attributes"), description: t("keyboard_actions.toggle-inherited-attributes"),
scope: "window" scope: "window"
@ -557,6 +629,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "toggleRibbonTabPromotedAttributes", actionName: "toggleRibbonTabPromotedAttributes",
friendlyName: t("keyboard_action_names.toggle-ribbon-tab-promoted-attributes"), friendlyName: t("keyboard_action_names.toggle-ribbon-tab-promoted-attributes"),
iconClass: "bx bx-star",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.toggle-promoted-attributes"), description: t("keyboard_actions.toggle-promoted-attributes"),
scope: "window" scope: "window"
@ -564,6 +637,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "toggleRibbonTabNoteMap", actionName: "toggleRibbonTabNoteMap",
friendlyName: t("keyboard_action_names.toggle-ribbon-tab-note-map"), friendlyName: t("keyboard_action_names.toggle-ribbon-tab-note-map"),
iconClass: "bx bxs-network-chart",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.toggle-link-map"), description: t("keyboard_actions.toggle-link-map"),
scope: "window" scope: "window"
@ -571,6 +645,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "toggleRibbonTabNoteInfo", actionName: "toggleRibbonTabNoteInfo",
friendlyName: t("keyboard_action_names.toggle-ribbon-tab-note-info"), friendlyName: t("keyboard_action_names.toggle-ribbon-tab-note-info"),
iconClass: "bx bx-info-circle",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.toggle-note-info"), description: t("keyboard_actions.toggle-note-info"),
scope: "window" scope: "window"
@ -578,6 +653,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "toggleRibbonTabNotePaths", actionName: "toggleRibbonTabNotePaths",
friendlyName: t("keyboard_action_names.toggle-ribbon-tab-note-paths"), friendlyName: t("keyboard_action_names.toggle-ribbon-tab-note-paths"),
iconClass: "bx bx-collection",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.toggle-note-paths"), description: t("keyboard_actions.toggle-note-paths"),
scope: "window" scope: "window"
@ -585,6 +661,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "toggleRibbonTabSimilarNotes", actionName: "toggleRibbonTabSimilarNotes",
friendlyName: t("keyboard_action_names.toggle-ribbon-tab-similar-notes"), friendlyName: t("keyboard_action_names.toggle-ribbon-tab-similar-notes"),
iconClass: "bx bx-bar-chart",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.toggle-similar-notes"), description: t("keyboard_actions.toggle-similar-notes"),
scope: "window" scope: "window"
@ -597,6 +674,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "toggleRightPane", actionName: "toggleRightPane",
friendlyName: t("keyboard_action_names.toggle-right-pane"), friendlyName: t("keyboard_action_names.toggle-right-pane"),
iconClass: "bx bx-dock-right",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.toggle-right-pane"), description: t("keyboard_actions.toggle-right-pane"),
scope: "window" scope: "window"
@ -604,6 +682,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "printActiveNote", actionName: "printActiveNote",
friendlyName: t("keyboard_action_names.print-active-note"), friendlyName: t("keyboard_action_names.print-active-note"),
iconClass: "bx bx-printer",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.print-active-note"), description: t("keyboard_actions.print-active-note"),
scope: "window" scope: "window"
@ -611,6 +690,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "exportAsPdf", actionName: "exportAsPdf",
friendlyName: t("keyboard_action_names.export-active-note-as-pdf"), friendlyName: t("keyboard_action_names.export-active-note-as-pdf"),
iconClass: "bx bxs-file-pdf",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.export-as-pdf"), description: t("keyboard_actions.export-as-pdf"),
scope: "window" scope: "window"
@ -618,6 +698,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "openNoteExternally", actionName: "openNoteExternally",
friendlyName: t("keyboard_action_names.open-note-externally"), friendlyName: t("keyboard_action_names.open-note-externally"),
iconClass: "bx bx-file-find",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.open-note-externally"), description: t("keyboard_actions.open-note-externally"),
scope: "window" scope: "window"
@ -625,6 +706,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "renderActiveNote", actionName: "renderActiveNote",
friendlyName: t("keyboard_action_names.render-active-note"), friendlyName: t("keyboard_action_names.render-active-note"),
iconClass: "bx bx-refresh",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.render-active-note"), description: t("keyboard_actions.render-active-note"),
scope: "window" scope: "window"
@ -632,6 +714,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "runActiveNote", actionName: "runActiveNote",
friendlyName: t("keyboard_action_names.run-active-note"), friendlyName: t("keyboard_action_names.run-active-note"),
iconClass: "bx bx-play",
defaultShortcuts: ["CommandOrControl+Enter"], defaultShortcuts: ["CommandOrControl+Enter"],
description: t("keyboard_actions.run-active-note"), description: t("keyboard_actions.run-active-note"),
scope: "code-detail" scope: "code-detail"
@ -639,6 +722,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "toggleNoteHoisting", actionName: "toggleNoteHoisting",
friendlyName: t("keyboard_action_names.toggle-note-hoisting"), friendlyName: t("keyboard_action_names.toggle-note-hoisting"),
iconClass: "bx bx-chevrons-up",
defaultShortcuts: ["Alt+H"], defaultShortcuts: ["Alt+H"],
description: t("keyboard_actions.toggle-note-hoisting"), description: t("keyboard_actions.toggle-note-hoisting"),
scope: "window" scope: "window"
@ -646,6 +730,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "unhoist", actionName: "unhoist",
friendlyName: t("keyboard_action_names.unhoist-note"), friendlyName: t("keyboard_action_names.unhoist-note"),
iconClass: "bx bx-door-open",
defaultShortcuts: ["Alt+U"], defaultShortcuts: ["Alt+U"],
description: t("keyboard_actions.unhoist"), description: t("keyboard_actions.unhoist"),
scope: "window" scope: "window"
@ -653,6 +738,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "reloadFrontendApp", actionName: "reloadFrontendApp",
friendlyName: t("keyboard_action_names.reload-frontend-app"), friendlyName: t("keyboard_action_names.reload-frontend-app"),
iconClass: "bx bx-refresh",
defaultShortcuts: ["F5", "CommandOrControl+R"], defaultShortcuts: ["F5", "CommandOrControl+R"],
description: t("keyboard_actions.reload-frontend-app"), description: t("keyboard_actions.reload-frontend-app"),
scope: "window" scope: "window"
@ -660,6 +746,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "openDevTools", actionName: "openDevTools",
friendlyName: t("keyboard_action_names.open-developer-tools"), friendlyName: t("keyboard_action_names.open-developer-tools"),
iconClass: "bx bx-bug-alt",
defaultShortcuts: isElectron ? ["CommandOrControl+Shift+I"] : [], defaultShortcuts: isElectron ? ["CommandOrControl+Shift+I"] : [],
description: t("keyboard_actions.open-dev-tools"), description: t("keyboard_actions.open-dev-tools"),
scope: "window" scope: "window"
@ -667,6 +754,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "findInText", actionName: "findInText",
friendlyName: t("keyboard_action_names.find-in-text"), friendlyName: t("keyboard_action_names.find-in-text"),
iconClass: "bx bx-search",
defaultShortcuts: isElectron ? ["CommandOrControl+F"] : [], defaultShortcuts: isElectron ? ["CommandOrControl+F"] : [],
description: t("keyboard_actions.find-in-text"), description: t("keyboard_actions.find-in-text"),
scope: "window" scope: "window"
@ -674,6 +762,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "toggleLeftPane", actionName: "toggleLeftPane",
friendlyName: t("keyboard_action_names.toggle-left-pane"), friendlyName: t("keyboard_action_names.toggle-left-pane"),
iconClass: "bx bx-dock-left",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.toggle-left-note-tree-panel"), description: t("keyboard_actions.toggle-left-note-tree-panel"),
scope: "window" scope: "window"
@ -681,6 +770,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "toggleFullscreen", actionName: "toggleFullscreen",
friendlyName: t("keyboard_action_names.toggle-full-screen"), friendlyName: t("keyboard_action_names.toggle-full-screen"),
iconClass: "bx bx-fullscreen",
defaultShortcuts: ["F11"], defaultShortcuts: ["F11"],
description: t("keyboard_actions.toggle-full-screen"), description: t("keyboard_actions.toggle-full-screen"),
scope: "window" scope: "window"
@ -688,6 +778,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "zoomOut", actionName: "zoomOut",
friendlyName: t("keyboard_action_names.zoom-out"), friendlyName: t("keyboard_action_names.zoom-out"),
iconClass: "bx bx-zoom-out",
defaultShortcuts: isElectron ? ["CommandOrControl+-"] : [], defaultShortcuts: isElectron ? ["CommandOrControl+-"] : [],
description: t("keyboard_actions.zoom-out"), description: t("keyboard_actions.zoom-out"),
scope: "window" scope: "window"
@ -695,6 +786,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "zoomIn", actionName: "zoomIn",
friendlyName: t("keyboard_action_names.zoom-in"), friendlyName: t("keyboard_action_names.zoom-in"),
iconClass: "bx bx-zoom-in",
description: t("keyboard_actions.zoom-in"), description: t("keyboard_actions.zoom-in"),
defaultShortcuts: isElectron ? ["CommandOrControl+="] : [], defaultShortcuts: isElectron ? ["CommandOrControl+="] : [],
scope: "window" scope: "window"
@ -702,6 +794,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "zoomReset", actionName: "zoomReset",
friendlyName: t("keyboard_action_names.reset-zoom-level"), friendlyName: t("keyboard_action_names.reset-zoom-level"),
iconClass: "bx bx-search-alt",
description: t("keyboard_actions.reset-zoom-level"), description: t("keyboard_actions.reset-zoom-level"),
defaultShortcuts: isElectron ? ["CommandOrControl+0"] : [], defaultShortcuts: isElectron ? ["CommandOrControl+0"] : [],
scope: "window" scope: "window"
@ -709,6 +802,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "copyWithoutFormatting", actionName: "copyWithoutFormatting",
friendlyName: t("keyboard_action_names.copy-without-formatting"), friendlyName: t("keyboard_action_names.copy-without-formatting"),
iconClass: "bx bx-copy-alt",
defaultShortcuts: ["CommandOrControl+Alt+C"], defaultShortcuts: ["CommandOrControl+Alt+C"],
description: t("keyboard_actions.copy-without-formatting"), description: t("keyboard_actions.copy-without-formatting"),
scope: "text-detail" scope: "text-detail"
@ -716,6 +810,7 @@ function getDefaultKeyboardActions() {
{ {
actionName: "forceSaveRevision", actionName: "forceSaveRevision",
friendlyName: t("keyboard_action_names.force-save-revision"), friendlyName: t("keyboard_action_names.force-save-revision"),
iconClass: "bx bx-save",
defaultShortcuts: [], defaultShortcuts: [],
description: t("keyboard_actions.force-save-revision"), description: t("keyboard_actions.force-save-revision"),
scope: "window" scope: "window"

View File

@ -108,6 +108,11 @@ export interface ActionKeyboardShortcut {
description?: string; description?: string;
defaultShortcuts?: string[]; defaultShortcuts?: string[];
effectiveShortcuts?: string[]; effectiveShortcuts?: string[];
/**
* An icon describing the action.
* This is currently only used in the command palette.
*/
iconClass: string;
/** /**
* Scope here means on which element the keyboard shortcuts are attached - this means that for the shortcut to work, * Scope here means on which element the keyboard shortcuts are attached - this means that for the shortcut to work,
* the focus has to be inside the element. * the focus has to be inside the element.