Commit 7aee52fc authored by Rob Stupay's avatar Rob Stupay

slight update of code from our conversation

parent 8a15fb7c
...@@ -445,7 +445,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org ...@@ -445,7 +445,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
type: 'solidityCompile', type: 'solidityCompile',
methods: [], methods: [],
} }
appManager.addPlugin({json: compileTabProfile, api: compileTab}) appManager.addPlugin({json: compileTabProfile, api: new InternalModule(compileTab) })
const testTab = new TestTab(self._components.registry, compileTab) const testTab = new TestTab(self._components.registry, compileTab)
const testTabProfile = { const testTabProfile = {
......
...@@ -25,11 +25,15 @@ class PluginManagerComponent { ...@@ -25,11 +25,15 @@ class PluginManagerComponent {
} }
_activate(item) { _activate(item) {
this.appManager.activate(item) this.event.emit('activation', item)
} }
_deactivate(item) { _deactivate(item) {
this.appManager.deactivate(item) this.event.emit('deactivation', item)
}
_addPlugin(url){
this.event.emit('plugin loading', url)
} }
renderItem (item) { renderItem (item) {
...@@ -42,6 +46,7 @@ class PluginManagerComponent { ...@@ -42,6 +46,7 @@ class PluginManagerComponent {
<button onclick=${() => { self._activate(item) }} ><button> <button onclick=${() => { self._activate(item) }} ><button>
<button onclick=${() => { self._deactivate(item) }} ><button> <button onclick=${() => { self._deactivate(item) }} ><button>
</div> </div>
<button onclick=${} ><button>
` `
} }
} }
......
...@@ -8,7 +8,7 @@ const styles = styleguide.chooser() ...@@ -8,7 +8,7 @@ const styles = styleguide.chooser()
const EventManager = remixLib.EventManager const EventManager = remixLib.EventManager
class SwapPanelApi { class SwapPanelApi {
constructor (swapPanelComponent) { constructor (swapPanelComponent, pluginManagerApi) {
this.component = swapPanelComponent this.component = swapPanelComponent
} }
...@@ -20,6 +20,11 @@ class SwapPanelApi { ...@@ -20,6 +20,11 @@ class SwapPanelApi {
// add the DOM to the swappanel // add the DOM to the swappanel
this.component.addView(viewTitle, contents) this.component.addView(viewTitle, contents)
} }
activate() {
this.event.emit(activated)
this.pluginManagerApi.activated(this.type)
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment