mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-01 20:52:27 +08:00
feat(touchbar): create child note in note tree
This commit is contained in:
parent
f98ac84829
commit
cbc6e74d64
@ -1778,6 +1778,16 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const items: TouchBarItem[] = [
|
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({
|
new TouchBar.TouchBarButton({
|
||||||
icon: buildIcon("NSImageNameTouchBarDeleteTemplate"),
|
icon: buildIcon("NSImageNameTouchBarDeleteTemplate"),
|
||||||
click: () => triggerCommand("deleteNotes")
|
click: () => triggerCommand("deleteNotes")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user