Who tf done this
This commit is contained in:
parent
ed8e977786
commit
ba6f89362d
9 changed files with 44 additions and 37 deletions
|
@ -44,7 +44,7 @@ export class Plugins {
|
|||
if (plugins[file] || plugin.name in plugins) {
|
||||
console.log(`[${plugin.name}] Plugin already loaded / Duplicate Class Name`);
|
||||
} else {
|
||||
plugins[file] = new plugin(electron.app, utils.getStore());
|
||||
plugins[file] = new plugin(utils);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -61,7 +61,7 @@ export class Plugins {
|
|||
if (plugins[file] || plugin in plugins) {
|
||||
console.log(`[${plugin.name}] Plugin already loaded / Duplicate Class Name`);
|
||||
} else {
|
||||
plugins[file] = new plugin(electron.app, utils.getStore());
|
||||
plugins[file] = new plugin(utils);
|
||||
}
|
||||
} else {
|
||||
const plugin = require(path.join(this.userPluginsPath, file));
|
||||
|
@ -69,7 +69,7 @@ export class Plugins {
|
|||
if (plugins[file] || plugin in plugins) {
|
||||
console.log(`[${plugin.name}] Plugin already loaded / Duplicate Class Name`);
|
||||
} else {
|
||||
plugins[file] = new plugin(electron.app, utils.getStore());
|
||||
plugins[file] = new plugin(utils);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,14 @@ export class utils {
|
|||
return this.paths[name];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the app
|
||||
* @returns {Electron.App}
|
||||
*/
|
||||
static getApp(): Electron.App {
|
||||
return app;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the i18n locale for the given language.
|
||||
* @param language {string} The language to fetch the locale for.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue