mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	refactorings for add link and include note
This commit is contained in:
		@@ -16,6 +16,7 @@ class AppContext {
 | 
			
		||||
        this.tabManager = new TabManager(this);
 | 
			
		||||
        this.components = [];
 | 
			
		||||
        this.executors = [];
 | 
			
		||||
        this.idToComponent = {};
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    async start() {
 | 
			
		||||
@@ -59,6 +60,18 @@ class AppContext {
 | 
			
		||||
        this.trigger('initialRenderComplete');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    registerComponent(componentId, component) {
 | 
			
		||||
        this.idToComponent[componentId] = component;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    findComponentById(componentId) {
 | 
			
		||||
        return this.idToComponent[componentId];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    getComponentByEl(el) {
 | 
			
		||||
        return $(el).closest(".component").prop('component');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    async trigger(name, data) {
 | 
			
		||||
        this.eventReceived(name, data);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user