mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
context menu now offer option to open notes in a new pane
This commit is contained in:
@@ -55,7 +55,7 @@ class TreeContextMenu {
|
||||
|
||||
return [
|
||||
{ title: 'Open in a new tab <kbd>Ctrl+Click</kbd>', command: "openInTab", uiIcon: "empty", enabled: noSelectedNotes },
|
||||
{ title: 'Open in a new window', command: "openInWindow", uiIcon: "window-open", enabled: noSelectedNotes },
|
||||
{ title: 'Open in a new pane', command: "openNoteInPane", uiIcon: "dock-right", enabled: noSelectedNotes },
|
||||
{ title: 'Insert note after <kbd data-command="createNoteAfter"></kbd>', command: "insertNoteAfter", uiIcon: "plus",
|
||||
items: insertNoteAfterEnabled ? this.getNoteTypeItems("insertNoteAfter") : null,
|
||||
enabled: insertNoteAfterEnabled && noSelectedNotes },
|
||||
@@ -130,6 +130,12 @@ class TreeContextMenu {
|
||||
isProtected: this.node.data.isProtected
|
||||
});
|
||||
}
|
||||
else if (command === 'openNoteInPane') {
|
||||
const subContexts = appContext.tabManager.getActiveContext().getSubContexts();
|
||||
const {ntxId} = subContexts[subContexts.length - 1];
|
||||
|
||||
this.treeWidget.triggerCommand("openNewPane", {ntxId, notePath});
|
||||
}
|
||||
else {
|
||||
this.treeWidget.triggerCommand(command, {node: this.node, notePath: notePath});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user