Added Plugin/Theme.showSettingsModal
This commit is contained in:
parent
3b66d320e8
commit
1f85d4d2f4
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -17,6 +17,7 @@ module.exports = (Plugin, Api, Vendor) => {
|
|||
onStop() {
|
||||
Events.unsubscribeAll();
|
||||
Logger.log('onStop');
|
||||
console.log(this.showSettingsModal());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue