fix registry

pull/3094/head
yann300 6 years ago
parent 9faab77786
commit cb919b3aa3
  1. 3
      src/app/tabs/settings-tab.js
  2. 7
      src/app/tabs/support-tab.js
  3. 6
      src/app/tabs/test-tab.js

@ -54,8 +54,7 @@ module.exports = class SettingsTab {
self._deps.compiler.setOptimize(self.data.optimize)
self.data.currentTheme = self._components.themeStorage.get('theme') || 'light'
var compilerEvent = self._components.registry.get('compiler').event
compilerEvent.register('compilerLoaded', (version) => self.setVersionText(version))
self._deps.compiler.event.register('compilerLoaded', (version) => self.setVersionText(version))
self.fetchAllVersion((allversions, selectedVersion) => {
self.data.allversions = allversions
self.data.selectedVersion = selectedVersion

@ -15,9 +15,12 @@ module.exports = class SupportTab {
self.data = { gitterIsLoaded: false }
self._components = {}
self._components.registry = localRegistry || globalRegistry
self._deps = {
app: self._components.registry.get('app').api
}
var appEvent = self._components.registry.get('app').event
appEvent.register('tabChanged', (tabName) => {
self._deps.app.event.register('tabChanged', (tabName) => {
if (tabName !== 'Support' || self.data.gitterIsLoaded) return
const iframe = yo`<iframe class="${css.chatIframe}" src='https://gitter.im/ethereum/remix/~embed'>`
self._view.gitterIframe.parentNode.replaceChild(iframe, self._view.gitterIframe)

@ -12,13 +12,13 @@ module.exports = class TestTab {
self._components.registry = localRegistry || globalRegistry
// dependencies
self._deps = {
fileManager: self._components.registry.get('filemanager').api
fileManager: self._components.registry.get('filemanager').api,
app: self._components.registry.get('app').api
}
self.data = {}
self._view.el = self.render()
var appEvent = self._components.registry.get('app').event
appEvent.register('tabChanged', tabName => {
self._deps.app.event.register('tabChanged', tabName => {
if (tabName !== 'test') return
yo.update(self._view.el, self.render())
self._view.el.style.display = 'block'

Loading…
Cancel
Save