diff --git a/apps/mana/apps/web/src/lib/modules/wetter/ListView.svelte b/apps/mana/apps/web/src/lib/modules/wetter/ListView.svelte index e24ae893f..23aeee591 100644 --- a/apps/mana/apps/web/src/lib/modules/wetter/ListView.svelte +++ b/apps/mana/apps/web/src/lib/modules/wetter/ListView.svelte @@ -1,139 +1,155 @@ -{#if weatherStore.loading && !weatherStore.weatherData} -
- 🌤 - Laden... -
-{:else if weatherStore.weatherData} - {@const data = weatherStore.weatherData} - {@const c = data.current} +
+ - -
-
- {getWeatherIcon(c.weatherCode, c.isDay)} - {Math.round(c.temperature)}° -
- {getWeatherLabel(c.weatherCode)} - {data.location.name} -
-
-
- Gefuehlt {Math.round(c.feelsLike)}° - 💨 {Math.round(c.windSpeed)} km/h {windDirectionLabel(c.windDirection)} - 💧 {c.humidity}% -
+ +
+ +
- - {#if data.alerts.length > 0} -
- {#each data.alerts.slice(0, 2) as alert (alert.id)} -
- ⚠ {alert.event} -
- {/each} + {#if activeTab === 'compare' && selectedLat != null && selectedLon != null} + + {:else if weatherStore.loading && !weatherStore.weatherData} +
+ 🌤 + Wetterdaten werden geladen...
- {/if} + {:else if weatherStore.error && !weatherStore.weatherData} +
{weatherStore.error}
+ {:else if weatherStore.weatherData} + {@const data = weatherStore.weatherData} - - {#if data.hourly.length > 0} -
- {#each data.hourly.slice(0, 8) as hour (hour.time)} - {@const time = new Date(hour.time).toLocaleTimeString('de-DE', { hour: '2-digit' })} -
- {time} - {getWeatherIcon(hour.weatherCode, hour.isDay)} - {Math.round(hour.temperature)}° -
- {/each} -
- {/if} + - - {#if data.daily.length > 0} -
- {#each data.daily.slice(0, 5) as day, idx (day.date)} - {@const label = - idx === 0 - ? 'Heute' - : new Date(day.date).toLocaleDateString('de-DE', { weekday: 'short' })} -
- {label} - {getWeatherIcon(day.weatherCode)} - {Math.round(day.temperatureMin)}° / {Math.round(day.temperatureMax)}° -
- {/each} -
- {/if} + - - {#if weatherStore.nowcast} -
- {weatherStore.nowcast.summary} -
+ {#if weatherStore.nowcast} + + {/if} + + {#if data.hourly.length > 0} + + {/if} + + {#if data.daily.length > 0} + + {/if} + + {#if weatherStore.loading} +
Aktualisierung...
+ {/if} {/if} -{:else if weatherStore.error} -
{weatherStore.error}
-{/if} +