diff --git a/lib/common/common.js b/lib/common/common.js index 804ce40..f7405e0 100644 --- a/lib/common/common.js +++ b/lib/common/common.js @@ -95,10 +95,10 @@ export default new class newCommon { if (typeof format === 'string') { format = format - .replaceAll('dd', day) - .replaceAll('hh', timeObj.hour) - .replaceAll('mm', timeObj.minute) - .replaceAll('ss', timeObj.second) + .replace(/dd/g, day) + .replace(/hh/g, timeObj.hour) + .replace(/mm/g, timeObj.minute) + .replace(/ss/g, timeObj.second) return format } diff --git a/model/State.js b/model/State.js index 4ee2f8d..2fd57ea 100644 --- a/model/State.js +++ b/model/State.js @@ -303,8 +303,8 @@ export default new class { vendor, temperatureGpu, utilizationGpu, memoryTotal, memoryUsed, powerDraw } = graphics - temperatureGpu &&= temperatureGpu + '℃' - powerDraw &&= powerDraw + 'W' + temperatureGpu && (temperatureGpu = temperatureGpu + '℃') + powerDraw && (powerDraw = powerDraw + 'W') return { ...this.Circle(utilizationGpu / 100), inner: Math.round(utilizationGpu) + '%',