From dd575787fe42cc89d4f138e8c867410453e4f5f7 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 8 Mar 2025 12:06:35 +0200 Subject: [PATCH] feat(touch_bar): functional new note button --- src/public/app/components/app_context.ts | 2 ++ src/public/app/widgets/touch_bar.ts | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/public/app/components/app_context.ts b/src/public/app/components/app_context.ts index 8cbe6b527..3e1535393 100644 --- a/src/public/app/components/app_context.ts +++ b/src/public/app/components/app_context.ts @@ -162,6 +162,8 @@ export type CommandMappings = { moveNoteDownInHierarchy: ContextMenuCommandData; selectAllNotesInParent: ContextMenuCommandData; + createNoteIntoInbox: CommandData; + addNoteLauncher: ContextMenuCommandData; addScriptLauncher: ContextMenuCommandData; addWidgetLauncher: ContextMenuCommandData; diff --git a/src/public/app/widgets/touch_bar.ts b/src/public/app/widgets/touch_bar.ts index 5fcb3ee7d..92b1ab060 100644 --- a/src/public/app/widgets/touch_bar.ts +++ b/src/public/app/widgets/touch_bar.ts @@ -42,10 +42,8 @@ export default class TouchBarWidget extends Component { const items = [ new TouchBarButton({ - icon: this.#buildIcon("NSTouchBarAddDetailTemplate"), - click: () => { - console.log("New note pressed."); - } + icon: this.#buildIcon("NSTouchBarComposeTemplate"), + click: () => this.triggerCommand("createNoteIntoInbox") }) ];