From 663e856e1f19a7086460b6caf97a5a75c12ed132 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 6 Sep 2018 20:32:25 +0200 Subject: [PATCH] improved display --- .idea/workspace.xml | 58 ++++++++++--------------- src/renderer/components/WelcomeView.vue | 31 +++++++++---- 2 files changed, 47 insertions(+), 42 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index f4b4e06..c4a2dbb 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,11 +3,7 @@ - - - - @@ -22,10 +18,10 @@ - + - - + + @@ -50,20 +46,20 @@ - + - + - + @@ -73,7 +69,7 @@ - + @@ -82,11 +78,8 @@ - - - - - + + @@ -139,9 +132,9 @@ - @@ -224,15 +217,15 @@ + - - - + @@ -287,13 +280,6 @@ - - - - - - - @@ -308,13 +294,17 @@ + + + + + + + - - - - - + + diff --git a/src/renderer/components/WelcomeView.vue b/src/renderer/components/WelcomeView.vue index 0543b58..220584d 100644 --- a/src/renderer/components/WelcomeView.vue +++ b/src/renderer/components/WelcomeView.vue @@ -17,12 +17,24 @@ - + -

{{temp}}°F

-

Min Temperature : {{ tempMin }}

-

Max Temperature : {{ tempMax }}

-

Humidity : {{ humidity }}

+ + + + +

{{temp.toFixed(2)}}°C

+

{{weatherDescription}}

+
+
+ + +

fas fa-snowflakeMin : {{ tempMin.toFixed(2) }}°C

+

fas fa-sunMax : {{ tempMax.toFixed(2) }}°C

+

fas fa-tintHumidity : {{ humidity }} %

+
+
+
@@ -45,6 +57,7 @@ tempMin: null, tempMax: null, humidity: null, + show: false, key: '863668499362fb4884ebd97229f3b26b', url: 'http://api.openweathermap.org/data/2.5/weather' } @@ -61,10 +74,12 @@ } }).then(response => { console.log(response.data) - this.temp = response.data.main.temp - this.tempMax = response.data.main.temp_max - this.tempMin = response.data.main.temp_min + this.temp = response.data.main.temp - 274 + this.tempMax = response.data.main.temp_max - 274 + this.tempMin = response.data.main.temp_min - 274 this.humidity = response.data.main.humidity + this.weatherDescription = response.data.weather[0].description + this.show = true }).catch(errors => { console.log(errors) })