From 52a8556565369ed1d9410f7f7bd441d422504c7b Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Thu, 29 Jun 2023 13:29:22 +0100 Subject: [PATCH] fix message on badge --- apps/remix-ide/src/app/tabs/analysis-tab.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/analysis-tab.js b/apps/remix-ide/src/app/tabs/analysis-tab.js index 24d14b1432..e53573e0b0 100644 --- a/apps/remix-ide/src/app/tabs/analysis-tab.js +++ b/apps/remix-ide/src/app/tabs/analysis-tab.js @@ -37,15 +37,6 @@ class AnalysisTab extends ViewPlugin { 'offsettolinecolumnconverter').api } this.dispatch = null - /** - * @type {Array<{ - formattedMessage: string; - type: "warning" | "error"; - column: number; - line: number; - }>} - * @description Array of objects containing the results of Linting - */ this.hints = [] } @@ -70,9 +61,10 @@ class AnalysisTab extends ViewPlugin { } if (count > 0) { - this.emit('statusChanged', { key: count, title: `${count} warning${count === 1 ? '' : 's'}`, type: payloadType }) + // this.emit('statusChanged', { key: count, title: `${count} warning${count === 1 ? '' : 's'}`, type: payloadType }) + this.emit('statusChanged', { key: count, title: payloadType === 'error' ? `You have some problem${count === 1 ? '' : 's'}` : 'You have some warnings', type: payloadType }) } else if (count === 0) { - this.emit('statusChanged', { key: 'succeed', title: 'no warning', type: 'success' }) + this.emit('statusChanged', { key: 'succeed', title: 'no warnings or errors', type: 'success' }) } else { // count ==-1 no compilation result this.emit('statusChanged', { key: 'none' })