You've already forked joplin
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:
@@ -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}.`);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user