From 9c24b891806cadafc4239d6cff4abb47fcf33b9d Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 8 Mar 2025 13:13:21 +0200 Subject: [PATCH] feat(touch_bar): jump to note --- src/public/app/components/app_context.ts | 1 + src/public/app/widgets/touch_bar.ts | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/public/app/components/app_context.ts b/src/public/app/components/app_context.ts index 3e1535393..e93994fd5 100644 --- a/src/public/app/components/app_context.ts +++ b/src/public/app/components/app_context.ts @@ -241,6 +241,7 @@ export type CommandMappings = { scrollToEnd: CommandData; closeThisNoteSplit: CommandData; moveThisNoteSplit: CommandData & { isMovingLeft: boolean }; + jumpToNote: CommandData; // Geomap deleteFromMap: { noteId: string }; diff --git a/src/public/app/widgets/touch_bar.ts b/src/public/app/widgets/touch_bar.ts index 7103c1988..e9a7c3d4e 100644 --- a/src/public/app/widgets/touch_bar.ts +++ b/src/public/app/widgets/touch_bar.ts @@ -57,7 +57,7 @@ export default class TouchBarWidget extends Component { icon: this.#buildIcon("NSTouchBarComposeTemplate"), click: () => this.triggerCommand("createNoteIntoInbox") }), - new TouchBarSpacer({ }), + new TouchBarSpacer({ size: "flexible" }), new TouchBarGroup({ items: new TouchBar({ items: [ @@ -75,6 +75,11 @@ export default class TouchBarWidget extends Component { }) ] }) + }), + new TouchBarSpacer({ size: "flexible" }), + new TouchBarButton({ + icon: this.#buildIcon("NSTouchBarAddDetailTemplate"), + click: () => this.triggerCommand("jumpToNote") }) ];