mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 15:11:31 +08:00 
			
		
		
		
	fix clone notes dialog
This commit is contained in:
		
							parent
							
								
									e1bf4dcbc9
								
							
						
					
					
						commit
						b2a48a1f3a
					
				@ -33,16 +33,6 @@ export default class DialogCommandExecutor extends Component {
 | 
				
			|||||||
        import("../dialogs/markdown_import.js").then(d => d.importMarkdownInline());
 | 
					        import("../dialogs/markdown_import.js").then(d => d.importMarkdownInline());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    async cloneNotesToCommand() {
 | 
					 | 
				
			||||||
        // FIXME
 | 
					 | 
				
			||||||
        const selectedOrActiveNodes = this.appContext.getMainNoteTree().getSelectedOrActiveNodes();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        const noteIds = selectedOrActiveNodes.map(node => node.data.noteId);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        const d = await import("../dialogs/clone_to.js");
 | 
					 | 
				
			||||||
        d.showDialog(noteIds);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    async editBranchPrefixCommand() {
 | 
					    async editBranchPrefixCommand() {
 | 
				
			||||||
        const notePath = this.appContext.tabManager.getActiveTabNotePath();
 | 
					        const notePath = this.appContext.tabManager.getActiveTabNotePath();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -56,6 +46,11 @@ export default class DialogCommandExecutor extends Component {
 | 
				
			|||||||
        import("../dialogs/add_link.js").then(d => d.showDialog());
 | 
					        import("../dialogs/add_link.js").then(d => d.showDialog());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    async cloneNoteIdsToCommand({noteIds}) {
 | 
				
			||||||
 | 
					        const d = await import("../dialogs/clone_to.js");
 | 
				
			||||||
 | 
					        d.showDialog(noteIds);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    async moveBranchIdsToCommand({branchIds}) {
 | 
					    async moveBranchIdsToCommand({branchIds}) {
 | 
				
			||||||
        const d = await import("../dialogs/move_to.js");
 | 
					        const d = await import("../dialogs/move_to.js");
 | 
				
			||||||
        d.showDialog(branchIds);
 | 
					        d.showDialog(branchIds);
 | 
				
			||||||
 | 
				
			|||||||
@ -617,6 +617,12 @@ export default class NoteTreeWidget extends TabAwareWidget {
 | 
				
			|||||||
        this.reloadTreeFromCache();
 | 
					        this.reloadTreeFromCache();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    async cloneNotesToCommand() {
 | 
				
			||||||
 | 
					        const selectedOrActiveNoteIds = this.getSelectedOrActiveNodes().map(node => node.data.noteId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.triggerCommand('cloneNoteIdsTo', {noteIds: selectedOrActiveNoteIds});
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    async moveNotesToCommand() {
 | 
					    async moveNotesToCommand() {
 | 
				
			||||||
        const selectedOrActiveBranchIds = this.getSelectedOrActiveNodes().map(node => node.data.branchId);
 | 
					        const selectedOrActiveBranchIds = this.getSelectedOrActiveNodes().map(node => node.data.branchId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user