mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
components now track their parent
This commit is contained in:
@@ -2,11 +2,16 @@ import utils from '../services/utils.js';
|
||||
import Mutex from "../services/mutex.js";
|
||||
|
||||
export default class Component {
|
||||
/** @param {AppContext} appContext */
|
||||
constructor(appContext) {
|
||||
/**
|
||||
* @param {AppContext} appContext
|
||||
* @param {Component} parent
|
||||
*/
|
||||
constructor(appContext, parent) {
|
||||
this.componentId = `comp-${this.constructor.name}-` + utils.randomString(6);
|
||||
/** @type AppContext */
|
||||
this.appContext = appContext;
|
||||
/** @type Component */
|
||||
this.parent = parent;
|
||||
/** @type TabManager */
|
||||
this.tabManager = appContext.tabManager;
|
||||
/** @type Component[] */
|
||||
@@ -59,4 +64,8 @@ export default class Component {
|
||||
|
||||
await Promise.all(promises);
|
||||
}
|
||||
|
||||
triggerCommand(name, data) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user