add move to dialog

This commit is contained in:
zadam
2019-11-11 22:57:51 +01:00
parent 5b4a2bd71c
commit 4cda661c1b
8 changed files with 156 additions and 43 deletions

View File

@@ -18,6 +18,7 @@ const NOTE_INFO = "../dialogs/note_info.js";
const ABOUT = "../dialogs/about.js";
const LINK_MAP = "../dialogs/link_map.js";
const CLONE_TO = "../dialogs/clone_to.js";
const MOVE_TO = "../dialogs/move_to.js";
function registerEntrypoints() {
// hot keys are active also inside inputs and content editables
@@ -189,14 +190,22 @@ function registerEntrypoints() {
utils.bindGlobalShortcut('ctrl+shift+c', () => import(CLONE_TO).then(d => {
const activeNode = treeService.getActiveNode();
console.log("activeNode", activeNode);
const selectedOrActiveNodes = treeService.getSelectedOrActiveNodes(activeNode);
console.log("selectedOrActiveNodes", selectedOrActiveNodes);
const noteIds = selectedOrActiveNodes.map(node => node.data.noteId);
d.showDialog(noteIds);
}));
utils.bindGlobalShortcut('ctrl+shift+x', () => import(MOVE_TO).then(d => {
const activeNode = treeService.getActiveNode();
const selectedOrActiveNodes = treeService.getSelectedOrActiveNodes(activeNode);
d.showDialog(selectedOrActiveNodes);
}));
}
export default {