| 
									
										
										
										
											2020-01-20 22:35:52 +01:00
										 |  |  | import Component from "../widgets/component.js"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export default class DialogEventComponent extends Component { | 
					
						
							|  |  |  |     jumpToNoteListener() { | 
					
						
							|  |  |  |         import("../dialogs/jump_to_note.js").then(d => d.showDialog()); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     showRecentChangesListener() { | 
					
						
							|  |  |  |         import("../dialogs/recent_changes.js").then(d => d.showDialog()); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     showAttributesListener() { | 
					
						
							|  |  |  |         import("../dialogs/attributes.js").then(d => d.showDialog()); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     showNoteInfoListener() { | 
					
						
							|  |  |  |         import("../dialogs/note_info.js").then(d => d.showDialog()); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     showNoteRevisionsListener() { | 
					
						
							|  |  |  |         import("../dialogs/note_revisions.js").then(d => d.showCurrentNoteRevisions()); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     showNoteSourceListener() { | 
					
						
							|  |  |  |         import("../dialogs/note_source.js").then(d => d.showDialog()); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     showLinkMapListener() { | 
					
						
							|  |  |  |         import("../dialogs/link_map.js").then(d => d.showDialog()); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     pasteMarkdownIntoTextListener() { | 
					
						
							|  |  |  |         import("../dialogs/markdown_import.js").then(d => d.importMarkdownInline()); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     async cloneNotesToListener() { | 
					
						
							| 
									
										
										
										
											2020-02-07 20:56:49 +01:00
										 |  |  |         // FIXME
 | 
					
						
							| 
									
										
										
										
											2020-01-20 22:35:52 +01:00
										 |  |  |         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 moveNotesToListener() { | 
					
						
							| 
									
										
										
										
											2020-02-07 20:56:49 +01:00
										 |  |  |         // FIXME
 | 
					
						
							| 
									
										
										
										
											2020-01-20 22:35:52 +01:00
										 |  |  |         const selectedOrActiveNodes = this.appContext.getMainNoteTree().getSelectedOrActiveNodes(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         const d = await import("../dialogs/move_to.js"); | 
					
						
							|  |  |  |         d.showDialog(selectedOrActiveNodes); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     async editBranchPrefixListener() { | 
					
						
							| 
									
										
										
										
											2020-02-14 21:21:47 +01:00
										 |  |  |         const notePath = this.appContext.tabManager.getActiveTabNotePath(); | 
					
						
							| 
									
										
										
										
											2020-01-20 22:35:52 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-14 21:21:47 +01:00
										 |  |  |         if (notePath) { | 
					
						
							|  |  |  |             const editBranchPrefixDialog = await import("../dialogs/branch_prefix.js"); | 
					
						
							|  |  |  |             editBranchPrefixDialog.showDialog(notePath); | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2020-01-20 22:35:52 +01:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     addLinkToTextListener() { | 
					
						
							|  |  |  |         import("../dialogs/add_link.js").then(d => d.showDialog()); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |