1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Desktop: Allow customising application layout

This commit is contained in:
Laurent Cozic
2020-11-13 17:09:28 +00:00
parent 17d835d694
commit 67f0739d3c
222 changed files with 7967 additions and 1810 deletions

View File

@@ -62,6 +62,10 @@ export default class Plugin {
return this.baseDir_;
}
public get viewCount(): number {
return Object.keys(this.viewControllers_).length;
}
on(eventName: string, callback: Function) {
return this.eventEmitter_.on(eventName, callback);
}
@@ -101,7 +105,7 @@ export default class Plugin {
}
public addViewController(v: ViewController) {
if (this.viewControllers_[v.handle]) throw new Error(`View already added: ${v.handle}`);
if (this.viewControllers_[v.handle]) throw new Error(`View already added or there is already a view with this ID: ${v.handle}`);
this.viewControllers_[v.handle] = v;
}
@@ -110,4 +114,8 @@ export default class Plugin {
return this.viewControllers_[handle];
}
public deprecationNotice(goneInVersion: string, message: string) {
this.logger_.warn(`Plugin: ${this.id}: DEPRECATION NOTICE: ${message} The current feature will stop working in version ${goneInVersion}.`);
}
}