mirror of
https://github.com/zadam/trilium.git
synced 2025-10-31 18:36:30 +01:00
clone to notes now has overview of notes to clone and is available from context menu
This commit is contained in:
@@ -64,6 +64,8 @@ class TreeContextMenu {
|
||||
{ title: "----" },
|
||||
{ title: "Copy / clone <kbd>Ctrl+C</kbd>", cmd: "copy", uiIcon: "copy",
|
||||
enabled: isNotRoot },
|
||||
{ title: "Clone to ...", cmd: "cloneTo", uiIcon: "empty",
|
||||
enabled: isNotRoot },
|
||||
{ title: "Cut <kbd>Ctrl+X</kbd>", cmd: "cut", uiIcon: "cut",
|
||||
enabled: isNotRoot && !isHoisted && parentNotSearch },
|
||||
{ title: "Paste into <kbd>Ctrl+V</kbd>", cmd: "pasteInto", uiIcon: "paste",
|
||||
@@ -121,6 +123,12 @@ class TreeContextMenu {
|
||||
else if (cmd === "copy") {
|
||||
clipboard.copy(treeService.getSelectedOrActiveNodes(this.node));
|
||||
}
|
||||
else if (cmd === "cloneTo") {
|
||||
const nodes = treeService.getSelectedOrActiveNodes(this.node);
|
||||
const noteIds = nodes.map(node => node.data.noteId);
|
||||
|
||||
import("../dialogs/clone_to.js").then(d => d.showDialog(noteIds))
|
||||
}
|
||||
else if (cmd === "cut") {
|
||||
clipboard.cut(treeService.getSelectedOrActiveNodes(this.node));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user