rename event

pull/3094/head
yann300 6 years ago
parent 0fcf3ac3df
commit 38cd56ca1a
  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
let fn = this.iconStatus[api.profile.name]
if (fn) {
api.events.unregister('setStatus', fn)
api.events.remove('statusChanged', fn)
delete this.iconStatus[api.profile.name]
}
}
@ -49,7 +49,7 @@ class VerticalIconComponent {
this.setIconStatus(api.profile.name, status)
}
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()
staticanalysis.event.register('staticAnaysisWarning', (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 {
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'})

@ -79,7 +79,7 @@ class CompileTab extends ApiFactory {
if (this._view.errorContainer) {
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) => {
@ -89,7 +89,7 @@ class CompileTab extends ApiFactory {
if (success) {
// forwarding the event to the appManager infra
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
this.data.contractsDetails = {}
this.compiler.visitContracts((contract) => {
@ -100,7 +100,7 @@ class CompileTab extends ApiFactory {
)
})
} 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
let contractMap = {}

Loading…
Cancel
Save