feat(touch_bar): new geonote button

This commit is contained in:
Elian Doran
2025-03-08 22:56:32 +02:00
parent ece26960c3
commit 5961e983c7
2 changed files with 6 additions and 3 deletions

View File

@@ -256,6 +256,8 @@ export type CommandMappings = {
refreshResults: {};
refreshSearchDefinition: {};
geoMapCreateChildNote: CommandData;
buildTouchBar: CommandData & {
TouchBar: typeof import("electron").TouchBar;
buildIcon(name: string): NativeImage;
@@ -356,9 +358,6 @@ type EventMappings = {
exportSvg: {
ntxId: string | null | undefined;
};
geoMapCreateChildNote: {
ntxId: string | null | undefined; // TODO: deduplicate ntxId
};
tabReorder: {
ntxIdsInOrder: string[];
};

View File

@@ -77,6 +77,10 @@ export default class GeoMapWidget extends NoteContextAwareWidget {
change(newValue) {
map.setZoom(newValue);
},
}),
new TouchBar.TouchBarButton({
label: "New geo note",
click: () => this.parent?.triggerEvent("geoMapCreateChildNote", { ntxId: this.ntxId })
})
];
}