mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-11-12 13:11:31 +08:00
feat(touch_bar): new geonote button
This commit is contained in:
parent
ece26960c3
commit
5961e983c7
@ -256,6 +256,8 @@ export type CommandMappings = {
|
|||||||
refreshResults: {};
|
refreshResults: {};
|
||||||
refreshSearchDefinition: {};
|
refreshSearchDefinition: {};
|
||||||
|
|
||||||
|
geoMapCreateChildNote: CommandData;
|
||||||
|
|
||||||
buildTouchBar: CommandData & {
|
buildTouchBar: CommandData & {
|
||||||
TouchBar: typeof import("electron").TouchBar;
|
TouchBar: typeof import("electron").TouchBar;
|
||||||
buildIcon(name: string): NativeImage;
|
buildIcon(name: string): NativeImage;
|
||||||
@ -356,9 +358,6 @@ type EventMappings = {
|
|||||||
exportSvg: {
|
exportSvg: {
|
||||||
ntxId: string | null | undefined;
|
ntxId: string | null | undefined;
|
||||||
};
|
};
|
||||||
geoMapCreateChildNote: {
|
|
||||||
ntxId: string | null | undefined; // TODO: deduplicate ntxId
|
|
||||||
};
|
|
||||||
tabReorder: {
|
tabReorder: {
|
||||||
ntxIdsInOrder: string[];
|
ntxIdsInOrder: string[];
|
||||||
};
|
};
|
||||||
|
|||||||
@ -77,6 +77,10 @@ export default class GeoMapWidget extends NoteContextAwareWidget {
|
|||||||
change(newValue) {
|
change(newValue) {
|
||||||
map.setZoom(newValue);
|
map.setZoom(newValue);
|
||||||
},
|
},
|
||||||
|
}),
|
||||||
|
new TouchBar.TouchBarButton({
|
||||||
|
label: "New geo note",
|
||||||
|
click: () => this.parent?.triggerEvent("geoMapCreateChildNote", { ntxId: this.ntxId })
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user