|
|
|
@ -3,8 +3,6 @@ const modalDialog = require('../ui/modaldialog') |
|
|
|
|
|
|
|
|
|
module.exports = class LocalPlugin { |
|
|
|
|
|
|
|
|
|
constructor() {} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Open a modal to create a local plugin |
|
|
|
|
* @param {{profile: any, api: any}[]} plugins The list of the plugins in the store |
|
|
|
@ -12,10 +10,10 @@ module.exports = class LocalPlugin { |
|
|
|
|
*/ |
|
|
|
|
open (plugins) { |
|
|
|
|
this.profile = JSON.parse(localStorage.getItem('plugins/local')) || { notifications: {} } |
|
|
|
|
return new Promise((res, rej) => { |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
modalDialog('Local Plugin', this.form(plugins), |
|
|
|
|
{ fn:() => res(this.create()) }, |
|
|
|
|
{ fn: () => rej() } |
|
|
|
|
{ fn: () => resolve(this.create()) }, |
|
|
|
|
{ fn: () => resolve() } |
|
|
|
|
) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|