From b79561bc9c59d79875a9931d235774333579a363 Mon Sep 17 00:00:00 2001 From: Dick Wolff Date: Tue, 12 Jan 2021 11:39:27 +0100 Subject: Format file. --- src/components/services/OpenWeather.vue | 62 ++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 28 deletions(-) (limited to 'src/components/services') diff --git a/src/components/services/OpenWeather.vue b/src/components/services/OpenWeather.vue index 30abb2d..a9310ee 100644 --- a/src/components/services/OpenWeather.vue +++ b/src/components/services/OpenWeather.vue @@ -6,7 +6,11 @@
- +
@@ -21,10 +25,10 @@ {{ item.subtitle }}

@@ -47,36 +51,38 @@ export default { data: () => ({ api: { name: "", - weather: [{ - main: "", - description: "", - icon: "" - }], + weather: [ + { + main: "", + description: "", + icon: "", + }, + ], main: { - temp: "", - humidity: "" - } - } + temp: "", + humidity: "", + }, + }, }), computed: { temp: function () { if (this.api) { - return parseInt(this.api.main.temp).toFixed(1); + return parseInt(this.api.main.temp).toFixed(1); + } + return ""; + }, + image: function () { + if (this.api) { + return this.api.weather[0].icon; + } + return ""; + }, + conditions: function () { + if (this.api) { + return this.api.weather[0].description; } return ""; }, - image: function () { - if (this.api) { - return this.api.weather[0].icon; - } - return ""; - }, - conditions: function () { - if (this.api) { - return this.api.weather[0].description; - } - return ""; - } }, created() { this.fetchStatus(); @@ -96,4 +102,4 @@ export default { .media-left img { max-height: 100%; } - \ No newline at end of file + -- cgit v1.2.3