From 59994bfee8ae2151238e0ba98b84dd04ae3a43a4 Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Sun, 3 Jul 2022 21:59:57 +0200 Subject: Fix lint issues --- src/components/services/OpenWeather.vue | 28 ++++++++++++++-------------- src/components/services/UptimeKuma.vue | 1 + 2 files changed, 15 insertions(+), 14 deletions(-) (limited to 'src/components/services') diff --git a/src/components/services/OpenWeather.vue b/src/components/services/OpenWeather.vue index 79d5e37..756abf7 100644 --- a/src/components/services/OpenWeather.vue +++ b/src/components/services/OpenWeather.vue @@ -22,7 +22,7 @@

{{ name }}

- {{ temp | tempSuffix(this.item.units) }} + {{ temperature }}

@@ -50,6 +50,19 @@ export default { conditions: null, error: false, }), + computed: { + temperature: function () { + if (!this.temp) return ""; + + let unit = "K"; + if (this.item.type === "metric") { + unit = "°C"; + } else if (this.item.type === "imperial") { + unit = "°F"; + } + return `${this.temp} ${unit}`; + }, + }, created() { this.fetchWeather(); }, @@ -86,19 +99,6 @@ export default { }); }, }, - filters: { - tempSuffix: function (value, type) { - if (!value) return ""; - - let unit = "K"; - if (type === "metric") { - unit = "°C"; - } else if (type === "imperial") { - unit = "°F"; - } - return `${value} ${unit}`; - }, - }, }; diff --git a/src/components/services/UptimeKuma.vue b/src/components/services/UptimeKuma.vue index 3be53b8..5117a05 100644 --- a/src/components/services/UptimeKuma.vue +++ b/src/components/services/UptimeKuma.vue @@ -99,6 +99,7 @@ export default { }, }, created() { + /* eslint-disable */ this.item.url = `${this.item.url}/status/${this.dashboard}`; this.fetchStatus(); }, -- cgit v1.2.3