rename event

pull/1/head
yann300 6 years ago
parent 3ece5cef63
commit 790e270a48
  1. 4
      src/app/components/vertical-icons-component.js
  2. 4
      src/app/tabs/analysis-tab.js
  3. 6
      src/app/tabs/compile-tab.js

@ -38,7 +38,7 @@ class VerticalIconComponent {
if (!api.events) return if (!api.events) return
let fn = this.iconStatus[api.profile.name] let fn = this.iconStatus[api.profile.name]
if (fn) { if (fn) {
api.events.unregister('setStatus', fn) api.events.remove('statusChanged', fn)
delete this.iconStatus[api.profile.name] delete this.iconStatus[api.profile.name]
} }
} }
@ -49,7 +49,7 @@ class VerticalIconComponent {
this.setIconStatus(api.profile.name, status) this.setIconStatus(api.profile.name, status)
} }
this.iconStatus[api.profile.name] = fn this.iconStatus[api.profile.name] = fn
api.events.on('setStatus', this.iconStatus[api.profile.name]) api.events.on('statusChanged', this.iconStatus[api.profile.name])
} }
/** /**

@ -31,9 +31,9 @@ class AnalysisTab extends ApiFactory {
var staticanalysis = new StaticAnalysis() var staticanalysis = new StaticAnalysis()
staticanalysis.event.register('staticAnaysisWarning', (count) => { staticanalysis.event.register('staticAnaysisWarning', (count) => {
if (count) { if (count) {
this.events.emit('setStatus', {key: 'exclamation-triangle', title: count + ' warnings', type: 'warning'}) this.events.emit('statusChanged', {key: 'exclamation-triangle', title: count + ' warnings', type: 'warning'})
} else { } else {
this.events.emit('setStatus', {key: 'check', title: 'no warning', type: 'success'}) this.events.emit('statusChanged', {key: 'check', title: 'no warning', type: 'success'})
} }
}) })
this.registry.put({api: staticanalysis, name: 'staticanalysis'}) this.registry.put({api: staticanalysis, name: 'staticanalysis'})

@ -79,7 +79,7 @@ class CompileTab extends ApiFactory {
if (this._view.errorContainer) { if (this._view.errorContainer) {
this._view.errorContainer.innerHTML = '' this._view.errorContainer.innerHTML = ''
} }
this.events.emit('setStatus', {key: 'spinner', title: 'compiling...', type: 'info'}) this.events.emit('statusChanged', {key: 'spinner', title: 'compiling...', type: 'info'})
}) })
this.fileManager.events.on('currentFileChanged', (name) => { this.fileManager.events.on('currentFileChanged', (name) => {
@ -89,7 +89,7 @@ class CompileTab extends ApiFactory {
if (success) { if (success) {
// forwarding the event to the appManager infra // forwarding the event to the appManager infra
this.events.emit('compilationFinished', source.target, source, 'soljson', data) this.events.emit('compilationFinished', source.target, source, 'soljson', data)
this.events.emit('setStatus', {key: 'check', title: 'compilation successful', type: 'success'}) this.events.emit('statusChanged', {key: 'check', title: 'compilation successful', type: 'success'})
// Store the contracts // Store the contracts
this.data.contractsDetails = {} this.data.contractsDetails = {}
this.compiler.visitContracts((contract) => { this.compiler.visitContracts((contract) => {
@ -100,7 +100,7 @@ class CompileTab extends ApiFactory {
) )
}) })
} else { } else {
this.events.emit('setStatus', {key: 'exclamation', title: 'compilation failed', type: 'danger'}) this.events.emit('statusChanged', {key: 'exclamation', title: 'compilation failed', type: 'danger'})
} }
// Update contract Selection // Update contract Selection
let contractMap = {} let contractMap = {}

Loading…
Cancel
Save