|
|
@ -98,19 +98,36 @@ class PluginManagerComponent extends ViewPlugin { |
|
|
|
this.htmlElement = document.createElement('div') |
|
|
|
this.htmlElement = document.createElement('div') |
|
|
|
this.htmlElement.setAttribute('id', 'pluginManager') |
|
|
|
this.htmlElement.setAttribute('id', 'pluginManager') |
|
|
|
this.props = {} |
|
|
|
this.props = {} |
|
|
|
// this.views = {
|
|
|
|
this.views = { |
|
|
|
// root: null,
|
|
|
|
root: null, |
|
|
|
// items: {}
|
|
|
|
items: {} |
|
|
|
// }
|
|
|
|
} |
|
|
|
this.localPlugin = new LocalPlugin() |
|
|
|
this.localPlugin = new LocalPlugin() |
|
|
|
this.filter = '' |
|
|
|
this.filter = '' |
|
|
|
this.activePlugins = [] |
|
|
|
this.activePlugins = [] |
|
|
|
this.inactivePlugins = [] |
|
|
|
this.inactivePlugins = [] |
|
|
|
this.activePlugins = this.appManager.actives |
|
|
|
this.activePluginNames = this.appManager.actives |
|
|
|
// this.appManager.event.on('activate', () => { this.reRender() })
|
|
|
|
// this.appManager.event.on('activate', () => { this.reRender() })
|
|
|
|
// this.appManager.event.on('deactivate', () => { this.reRender() })
|
|
|
|
// this.appManager.event.on('deactivate', () => { this.reRender() })
|
|
|
|
// this.engine.event.on('onRegistration', () => { this.reRender() })
|
|
|
|
// this.engine.event.on('onRegistration', () => { this.reRender() })
|
|
|
|
// const { actives, inactives } = this.getAllPlugins()
|
|
|
|
// const { actives, inactives } = this.getAllPlugins()
|
|
|
|
|
|
|
|
console.log('views property contents', this.views) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
isActive (name) { |
|
|
|
|
|
|
|
this.appManager.actives.includes(name) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
activateP (name) { |
|
|
|
|
|
|
|
// console.log(this.appManager)
|
|
|
|
|
|
|
|
this.appManager.turnPluginOn(name) |
|
|
|
|
|
|
|
_paq.push(['trackEvent', 'manager', 'activate', name]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deactivateP (name) { |
|
|
|
|
|
|
|
// console.log(this.appManager)
|
|
|
|
|
|
|
|
this.call('manager', 'deactivatePlugin', name) |
|
|
|
|
|
|
|
_paq.push(['trackEvent', 'manager', 'deactivate', name]) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onActivation () { |
|
|
|
onActivation () { |
|
|
@ -124,27 +141,16 @@ class PluginManagerComponent extends ViewPlugin { |
|
|
|
appManager={this.appManager} |
|
|
|
appManager={this.appManager} |
|
|
|
engine={this.engine} |
|
|
|
engine={this.engine} |
|
|
|
localPlugin={this.localPlugin} |
|
|
|
localPlugin={this.localPlugin} |
|
|
|
activePlugins={this.activePlugins} |
|
|
|
activePluginNames={this.activePluginsNames} |
|
|
|
actives={this.activePlugins} |
|
|
|
actives={this.activePlugins} |
|
|
|
inactives={this.inactivePlugins} |
|
|
|
inactives={this.inactivePlugins} |
|
|
|
|
|
|
|
activatePlugin={this.activateP} |
|
|
|
|
|
|
|
deActivatePlugin={this.deactivateP} |
|
|
|
|
|
|
|
_paq={_paq} |
|
|
|
/>, |
|
|
|
/>, |
|
|
|
document.getElementById('pluginManager')) |
|
|
|
document.getElementById('pluginManager')) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
isActive (name) { |
|
|
|
|
|
|
|
return this.appManager.actives.includes(name) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// activateP (name) {
|
|
|
|
|
|
|
|
// this.appManager.activatePlugin(name)
|
|
|
|
|
|
|
|
// _paq.push(['trackEvent', 'manager', 'activate', name])
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// deactivateP (name) {
|
|
|
|
|
|
|
|
// this.call('manager', 'deactivatePlugin', name)
|
|
|
|
|
|
|
|
// _paq.push(['trackEvent', 'manager', 'deactivate', name])
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************** |
|
|
|
/*************** |
|
|
|
* SUB-COMPONENT |
|
|
|
* SUB-COMPONENT |
|
|
|
*/ |
|
|
|
*/ |
|
|
|