From f92c55f06615d441b5e00844a2b9e07081a1922e Mon Sep 17 00:00:00 2001 From: LianaHus Date: Wed, 8 May 2019 08:48:28 +0200 Subject: [PATCH] status keyword has been renamed --- src/app/components/vertical-icons-component.js | 8 ++++---- src/app/tabs/analysis-tab.js | 2 +- src/app/tabs/compile-tab.js | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/components/vertical-icons-component.js b/src/app/components/vertical-icons-component.js index 7c3f6799d9..1d8755e4c7 100644 --- a/src/app/components/vertical-icons-component.js +++ b/src/app/components/vertical-icons-component.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: { diff --git a/src/app/tabs/analysis-tab.js b/src/app/tabs/analysis-tab.js index dde0a2762e..1d67ea72d8 100644 --- a/src/app/tabs/analysis-tab.js +++ b/src/app/tabs/analysis-tab.js @@ -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'}) diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index 1a6957d2f9..3677852430 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -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) => {