Unverified Commit 5d56e7d1 authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #1936 from ethereum/swap_it_style_fixes_l

status update key has been renamed
parents 9a908090 f92c55f0
......@@ -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) => {
......
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