1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-24 23:26:50 +02:00

Desktop: Add config screen to add, remove or enable, disable plugins

This commit is contained in:
Laurent Cozic
2020-11-19 12:34:49 +00:00
parent f36019c94d
commit e57444dc32
24 changed files with 736 additions and 138 deletions

View File

@ -21,19 +21,17 @@ interface ContentScripts {
export default class Plugin {
private id_: string;
private baseDir_: string;
private manifest_: PluginManifest;
private scriptText_: string;
private enabled_: boolean = true;
private logger_: Logger = null;
private viewControllers_: ViewControllers = {};
private contentScripts_: ContentScripts = {};
private dispatch_: Function;
private eventEmitter_: any;
private devMode_: boolean = false;
constructor(id: string, baseDir: string, manifest: PluginManifest, scriptText: string, logger: Logger, dispatch: Function) {
this.id_ = id;
constructor(baseDir: string, manifest: PluginManifest, scriptText: string, logger: Logger, dispatch: Function) {
this.baseDir_ = shim.fsDriver().resolve(baseDir);
this.manifest_ = manifest;
this.scriptText_ = scriptText;
@ -43,15 +41,15 @@ export default class Plugin {
}
public get id(): string {
return this.id_;
return this.manifest.id;
}
public get enabled(): boolean {
return this.enabled_;
public get devMode(): boolean {
return this.devMode_;
}
public set enabled(v: boolean) {
this.enabled_ = v;
public set devMode(v: boolean) {
this.devMode_ = v;
}
public get manifest(): PluginManifest {