feat(touchbar): create child note in note tree

This commit is contained in:
Elian Doran 2025-04-13 21:47:16 +03:00
parent f98ac84829
commit cbc6e74d64
No known key found for this signature in database

View File

@ -1778,6 +1778,16 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
}
const items: TouchBarItem[] = [
new TouchBar.TouchBarButton({
icon: buildIcon("NSImageNameTouchBarAddTemplate"),
click: () => {
const node = this.getActiveNode();
const notePath = treeService.getNotePath(node);
noteCreateService.createNote(notePath, {
isProtected: node.data.isProtected
});
}
}),
new TouchBar.TouchBarButton({
icon: buildIcon("NSImageNameTouchBarDeleteTemplate"),
click: () => triggerCommand("deleteNotes")