Added Plugin/Theme.showSettingsModal

This commit is contained in:
Samuel Elliott 2018-02-13 17:07:51 +00:00
parent 3b66d320e8
commit 1f85d4d2f4
3 changed files with 11 additions and 1 deletions

View File

@ -9,6 +9,7 @@
*/
import { FileUtils } from 'common';
import { Modals } from 'ui';
export default class {
@ -48,6 +49,10 @@ export default class {
}
}
showSettingsModal() {
return Modals.pluginSettings(this);
}
async saveSettings(newSettings) {
for (let category of newSettings) {
const oldCategory = this.pluginConfig.find(c => c.category === category.category);

View File

@ -9,7 +9,7 @@
*/
import ContentManager from './contentmanager';
import { DOM } from 'ui';
import { DOM, Modals } from 'ui';
import { FileUtils, ClientIPC } from 'common';
class Theme {
@ -39,6 +39,10 @@ class Theme {
get css() { return this.userConfig.css }
get id() { return this.name.toLowerCase().replace(/\s+/g, '-') }
showSettingsModal() {
return Modals.themeSettings(this);
}
async saveSettings(newSettings) {
for (let category of newSettings) {
const oldCategory = this.themeConfig.find(c => c.category === category.category);

View File

@ -17,6 +17,7 @@ module.exports = (Plugin, Api, Vendor) => {
onStop() {
Events.unsubscribeAll();
Logger.log('onStop');
console.log(this.showSettingsModal());
return true;
}