From 57c5a27e8590bf1e847842ae6c9e8c82e959ccd3 Mon Sep 17 00:00:00 2001 From: Jakob Stendahl Date: Wed, 14 Oct 2020 13:19:39 +0200 Subject: Clean up some js, and make the UI a bit prettier --- src/components/PredictedSpaceWeather.svelte | 114 +++++++++++------------ src/components/PredictedSpaceWeatherThing.svelte | 3 + src/components/WeatherCurrent.svelte | 48 +++++----- src/routes/index.svelte | 6 +- 4 files changed, 84 insertions(+), 87 deletions(-) diff --git a/src/components/PredictedSpaceWeather.svelte b/src/components/PredictedSpaceWeather.svelte index 9194447..27fd02d 100644 --- a/src/components/PredictedSpaceWeather.svelte +++ b/src/components/PredictedSpaceWeather.svelte @@ -1,43 +1,26 @@
-
-

Predicted

-
-
- {#if predictions} + {#if predictions} +
+

Predicted

+
+
{#each predictions as prediction, i} {/each} - {:else} - Cannot connect to NOAA - {/if} -
+
+ {:else} +
+ +

No prediction data

+
+ {/if}
diff --git a/src/components/PredictedSpaceWeatherThing.svelte b/src/components/PredictedSpaceWeatherThing.svelte index 0a40e79..5c4cb5b 100644 --- a/src/components/PredictedSpaceWeatherThing.svelte +++ b/src/components/PredictedSpaceWeatherThing.svelte @@ -11,6 +11,7 @@ let time = dateTime[1].substring(0,5); let temp = prediction["temp"]; let clouds = prediction["clouds"]; + let hasNOMETData = prediction["hasNOMETData"];