From de4b7e6124254a192c897bdf0070b078a64ee563 Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Sat, 21 Oct 2023 14:24:05 +0200 Subject: Linting update --- package.json | 2 +- src/App.vue | 4 +- src/components/ConnectivityChecker.vue | 10 +- src/components/DarkMode.vue | 11 +- src/components/services/AdGuardHome.vue | 4 +- src/components/services/Healthchecks.vue | 2 +- src/components/services/Immich.vue | 30 +++--- src/components/services/Mealie.vue | 2 +- src/components/services/OctoPrint.vue | 18 +++- src/components/services/PaperlessNG.vue | 2 +- src/components/services/PiAlert.vue | 174 ++++++++++++++++--------------- src/components/services/PiHole.vue | 5 +- src/components/services/Portainer.vue | 4 +- src/components/services/Prometheus.vue | 6 +- src/components/services/Proxmox.vue | 6 +- src/components/services/Rtorrent.vue | 8 +- src/components/services/SABnzbd.vue | 2 +- src/components/services/Tautulli.vue | 2 +- src/components/services/Tdarr.vue | 18 ++-- src/components/services/qBittorrent.vue | 2 +- 20 files changed, 169 insertions(+), 143 deletions(-) diff --git a/package.json b/package.json index ee314e3..04f7c07 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homer", - "version": "23.09.1", + "version": "23.10.1", "scripts": { "dev": "vite", "mock": "http-server dummy-data/ --cors", diff --git a/src/App.vue b/src/App.vue index a329775..e84f083 100644 --- a/src/App.vue +++ b/src/App.vue @@ -208,7 +208,7 @@ export default { if (this.currentPage !== "default") { let pageConfig = await this.getConfig( - `assets/${this.currentPage}.yml` + `assets/${this.currentPage}.yml`, ); config = Object.assign(config, pageConfig); } @@ -245,7 +245,7 @@ export default { return response .text() .then((body) => { - return parse(body, {merge: true}); + return parse(body, { merge: true }); }) .then(function (config) { if (config.externalConfig) { diff --git a/src/components/ConnectivityChecker.vue b/src/components/ConnectivityChecker.vue index 5c77618..c58bfa7 100644 --- a/src/components/ConnectivityChecker.vue +++ b/src/components/ConnectivityChecker.vue @@ -30,21 +30,21 @@ export default { that.checkOffline(); } }, - false + false, ); window.addEventListener( "online", function () { that.checkOffline(); }, - false + false, ); window.addEventListener( "offline", function () { this.offline = true; }, - false + false, ); }, methods: { @@ -57,7 +57,9 @@ export default { // extra check to make sure we're not offline let that = this; const urlPath = window.location.pathname.replace(/\/+$/, ""); - const aliveCheckUrl = `${window.location.origin}${urlPath}/index.html?t=${new Date().valueOf()}`; + const aliveCheckUrl = `${ + window.location.origin + }${urlPath}/index.html?t=${new Date().valueOf()}`; return fetch(aliveCheckUrl, { method: "HEAD", cache: "no-store", diff --git a/src/components/DarkMode.vue b/src/components/DarkMode.vue index f0f823d..f1ed139 100644 --- a/src/components/DarkMode.vue +++ b/src/components/DarkMode.vue @@ -84,10 +84,13 @@ export default { }, watchIsDark: function () { - matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => { - this.isDark = this.getIsDark(); - this.$emit("updated", this.isDark); - }); + matchMedia("(prefers-color-scheme: dark)").addEventListener( + "change", + () => { + this.isDark = this.getIsDark(); + this.$emit("updated", this.isDark); + }, + ); }, }, }; diff --git a/src/components/services/AdGuardHome.vue b/src/components/services/AdGuardHome.vue index 4c53398..d5b84f6 100644 --- a/src/components/services/AdGuardHome.vue +++ b/src/components/services/AdGuardHome.vue @@ -63,12 +63,12 @@ export default { methods: { fetchStatus: async function () { this.status = await this.fetch("/control/status").catch((e) => - console.log(e) + console.log(e), ); }, fetchStats: async function () { this.stats = await this.fetch("/control/stats").catch((e) => - console.log(e) + console.log(e), ); }, }, diff --git a/src/components/services/Healthchecks.vue b/src/components/services/Healthchecks.vue index c60f241..0aefb74 100644 --- a/src/components/services/Healthchecks.vue +++ b/src/components/services/Healthchecks.vue @@ -66,7 +66,7 @@ export default { const apikey = this.item.apikey; if (!apikey) { console.error( - "apikey is not present in config.yml for the Healthchecks entry!" + "apikey is not present in config.yml for the Healthchecks entry!", ); return; } diff --git a/src/components/services/Immich.vue b/src/components/services/Immich.vue index e86ecd6..7cde306 100644 --- a/src/components/services/Immich.vue +++ b/src/components/services/Immich.vue @@ -40,7 +40,7 @@ export default { }, data: () => { return { - users: null, + users: null, photos: null, videos: null, usage: null, @@ -56,25 +56,27 @@ export default { }, computed: { humanizeSize: function () { - let bytes = this.usage; - if (Math.abs(bytes) < 1024) - return bytes + ' B'; + let bytes = this.usage; + if (Math.abs(bytes) < 1024) return bytes + " B"; - const units = ['KiB', 'MiB', 'GiB', 'TiB']; - let u = -1; - do { - bytes /= 1024; - ++u; - } while (Math.round(Math.abs(bytes) * 100) / 100 >= 1024 && u < units.length - 1); + const units = ["KiB", "MiB", "GiB", "TiB"]; + let u = -1; + do { + bytes /= 1024; + ++u; + } while ( + Math.round(Math.abs(bytes) * 100) / 100 >= 1024 && + u < units.length - 1 + ); - return bytes.toFixed(2) + ' ' + units[u]; + return bytes.toFixed(2) + " " + units[u]; }, }, methods: { fetchConfig: function () { const headers = { "x-api-key": this.item.apikey, - }; + }; this.fetch(`/api/server-info/stats`, { headers }) .then((stats) => { @@ -82,7 +84,7 @@ export default { this.videos = stats.videos; this.usage = stats.usage; this.users = stats.usageByUser.length; - }) + }) .catch((e) => { console.error(e); this.serverError = true; @@ -123,4 +125,4 @@ export default { } } } - \ No newline at end of file + diff --git a/src/components/services/Mealie.vue b/src/components/services/Mealie.vue index b5b2255..43550d8 100644 --- a/src/components/services/Mealie.vue +++ b/src/components/services/Mealie.vue @@ -45,7 +45,7 @@ export default { if (this.item.subtitle != null) return; this.meal = await this.fetch("/api/meal-plans/today/", { headers }).catch( - (e) => console.log(e) + (e) => console.log(e), ); this.stats = await this.fetch("/api/debug/statistics/", { headers, diff --git a/src/components/services/OctoPrint.vue b/src/components/services/OctoPrint.vue index 1428d9a..aceb2d8 100644 --- a/src/components/services/OctoPrint.vue +++ b/src/components/services/OctoPrint.vue @@ -6,7 +6,9 @@ -