status keyword has been renamed

pull/1/head
LianaHus 6 years ago
parent 9a908090a7
commit f92c55f066
  1. 8
      src/app/components/vertical-icons-component.js
  2. 2
      src/app/tabs/analysis-tab.js
  3. 6
      src/app/tabs/compile-tab.js

@ -53,7 +53,7 @@ class VerticalIconComponent {
if (!api.events) return
// the list of supported keys. 'none' will remove the status
const keys = ['edited', 'success', 'none', 'spinner', 'fail']
const keys = ['edited', 'succeed', 'none', 'loading', 'failed']
const types = ['error', 'warning', 'success', 'info', '']
const fn = (status) => {
if (!types.includes(status.type) && status.type) throw new Error(`type should be ${keys.join()}`)
@ -92,16 +92,16 @@ class VerticalIconComponent {
resolveClasses (key, type) {
let classes = css.status
switch (key) {
case 'success':
case 'succeed':
classes += ' fas fa-check-circle text-' + type + ' ' + css.statusCheck
break
case 'edited':
classes += ' fas fa-sync text-' + type + ' ' + css.statusCheck
break
case 'spinner':
case 'loading':
classes += ' fas fa-spinner text-' + type + ' ' + css.statusCheck
break
case 'fail':
case 'failed':
classes += ' fas fa-exclamation-triangle text-' + type + ' ' + css.statusCheck
break
default: {

@ -32,7 +32,7 @@ class AnalysisTab extends BaseApi {
if (count > 0) {
this.events.emit('statusChanged', {key: count, title: `${count} warning${count === 1 ? '' : 's'}`, type: 'warning'})
} else if (count === 0) {
this.events.emit('statusChanged', {key: 'success', title: 'no warning', type: 'success'})
this.events.emit('statusChanged', {key: 'succeed', title: 'no warning', type: 'success'})
} else {
// count ==-1 no compilation result
this.events.emit('statusChanged', {key: 'none'})

@ -83,7 +83,7 @@ class CompileTab extends CompilerApi {
this.editor.event.register('sessionSwitched', onContentChanged)
this.compiler.event.register('loadingCompiler', () => {
this.events.emit('statusChanged', {key: 'spinner', title: 'loading compiler...', type: 'info'})
this.events.emit('statusChanged', {key: 'loading', title: 'loading compiler...', type: 'info'})
})
this.compiler.event.register('compilerLoaded', () => {
@ -94,7 +94,7 @@ class CompileTab extends CompilerApi {
if (this._view.errorContainer) {
this._view.errorContainer.innerHTML = ''
}
this.events.emit('statusChanged', {key: 'spinner', title: 'compiling...', type: 'info'})
this.events.emit('statusChanged', {key: 'loading', title: 'compiling...', type: 'info'})
})
this.fileManager.events.on('currentFileChanged', (name) => {
@ -123,7 +123,7 @@ class CompileTab extends CompilerApi {
title: `compilation finished successful with warning${data.errors.length > 1 ? 's' : ''}`,
type: 'warning'
})
} else this.events.emit('statusChanged', {key: 'success', title: 'compilation successful', type: 'success'})
} else this.events.emit('statusChanged', {key: 'succeed', title: 'compilation successful', type: 'success'})
// Store the contracts
this.data.contractsDetails = {}
this.compiler.visitContracts((contract) => {

Loading…
Cancel
Save