π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
:adhesive_bandage: Fixes all minor issues raised by DeepScan
Alicie6e3d26d07742
diff --git a/src/components/Widgets/CryptoPriceChart.vue b/src/components/Widgets/CryptoPriceChart.vueindex ab719740..5d220105 100644--- a/src/components/Widgets/CryptoPriceChart.vue+++ b/src/components/Widgets/CryptoPriceChart.vue@@ -85,7 +85,7 @@ export default {axios.get(this.endpoint).then((response) => {try {- this.lineStatuses = this.processData(response.data);+ this.processData(response.data);} catch (chartingError) {this.error('Unable to plot results on chart', chartingError);}diff --git a/src/components/Widgets/CryptoWatchList.vue b/src/components/Widgets/CryptoWatchList.vueindex 2bf3c635..115f42bf 100644--- a/src/components/Widgets/CryptoWatchList.vue+++ b/src/components/Widgets/CryptoWatchList.vue@@ -47,7 +47,7 @@ export default {},limit() {const userChoice = this.options.limit;- if (userChoice && !Number.isNaN(userChoice) && userChoice > 0) return userChoice;+ if (userChoice && userChoice > 0) return userChoice;return 100;},/* How results should be sorted */diff --git a/src/components/Widgets/Flights.vue b/src/components/Widgets/Flights.vueindex c9b0039b..1805f67d 100644--- a/src/components/Widgets/Flights.vue+++ b/src/components/Widgets/Flights.vue@@ -83,7 +83,7 @@ export default {},limit() {const usersChoice = this.options.limit;- if (usersChoice && !Number.isNaN(usersChoice)) return usersChoice;+ if (usersChoice) return usersChoice;return 8;},/* The starting date, right now, in ISO String format */diff --git a/src/components/Widgets/PublicHolidays.vue b/src/components/Widgets/PublicHolidays.vueindex c22cc522..2c4690e9 100644--- a/src/components/Widgets/PublicHolidays.vue+++ b/src/components/Widgets/PublicHolidays.vue@@ -40,7 +40,7 @@ export default {},monthsToShow() {const usersChoice = this.options.monthsToShow;- if (usersChoice && !Number.isNaN(usersChoice) && usersChoice > 0 && usersChoice <= 24) {+ if (usersChoice && usersChoice > 0 && usersChoice <= 24) {return usersChoice;}return 12;diff --git a/src/components/Widgets/RssFeed.vue b/src/components/Widgets/RssFeed.vueindex e737ab84..06fc3e75 100644--- a/src/components/Widgets/RssFeed.vue+++ b/src/components/Widgets/RssFeed.vue@@ -53,7 +53,7 @@ export default {},limit() {const usersChoice = this.options.limit;- if (usersChoice && !Number.isNaN(usersChoice)) return usersChoice;+ if (usersChoice) return usersChoice;return 10;},orderBy() {diff --git a/src/components/Widgets/StockPriceChart.vue b/src/components/Widgets/StockPriceChart.vueindex 655d5d52..a0438ce4 100644--- a/src/components/Widgets/StockPriceChart.vue+++ b/src/components/Widgets/StockPriceChart.vue@@ -142,7 +142,7 @@ export default {},/* Format the price, rounding to given number of decimal places */formatPrice(priceStr) {- const price = parseInt(priceStr, 10);+ const price = parseFloat(priceStr, 10);let numDecimals = 0;if (price < 10) numDecimals = 1;if (price < 1) numDecimals = 2;diff --git a/src/components/Widgets/SystemInfo.vue b/src/components/Widgets/SystemInfo.vueindex 035abde8..96749512 100644--- a/src/components/Widgets/SystemInfo.vue+++ b/src/components/Widgets/SystemInfo.vue@@ -40,7 +40,7 @@ export default {return username ? `${username}@` : '';},makeUptime(seconds) {- if (!seconds || seconds === 0) return '';+ if (!seconds) return '';if (seconds < 60) return `${seconds} seconds`;if (seconds < 3600) return `${(seconds / 60).toFixed(1)} minutes`;if (seconds < 86400) return `${(seconds / 3600).toFixed(2)} hours`;diff --git a/src/components/Widgets/XkcdComic.vue b/src/components/Widgets/XkcdComic.vueindex ba565f76..5ddd8468 100644--- a/src/components/Widgets/XkcdComic.vue+++ b/src/components/Widgets/XkcdComic.vue@@ -31,7 +31,7 @@ export default {return 'latest';} else if (usersChoice === 'random') {return Math.abs(Math.floor(Math.random() * (1 - 2553)));- } else if (!Number.isNaN(usersChoice)) {+ } else if (usersChoice) {return usersChoice;}return 'latest';