Updated forecast summary

This commit is contained in:
2026-06-24 15:10:30 -04:00
parent 5794eca9f1
commit a69867406b
4 changed files with 15 additions and 14 deletions

View File

@@ -137,11 +137,11 @@ onMounted(async () => {
<div class="flex-c fg-muted">
<div class="hi">
<div v-if="!data" class="d-inline-block pos-rel br-2 overflow-hidden" style="width: 25px; height: 1em"><Loading/></div>
<template v-else> {{ 0 }}°</template>
<template v-else> {{ ~~(data.temperature_max) }}°</template>
</div>
<div class="lo">
<div v-if="!data" class="d-inline-block pos-rel br-2 overflow-hidden" style="width: 25px; height: 1em"><Loading/></div>
<template v-else> {{ 0 }}°</template>
<template v-else> {{ ~~(data.temperature_min) }}°</template>
</div>
</div>
</div>
@@ -153,7 +153,7 @@ onMounted(async () => {
<div class="stat">
<span class="stat-label">Precipitation</span>
<div v-if="!data" class="w-100 pos-rel br-2 overflow-hidden" style="height: 1.75em"><Loading/></div>
<span v-else class="stat-value">{{ !data.precipitation && data.raining == 'True' ? 'Spitting' : data.precipitation.toFixed(1) + 'mm'}}</span>
<span v-else class="stat-value">{{ data.raining == 'False' ? (data.precipitation_chance + '%') : (data.percipitation > 0 ? data.precipitation.toFixed(1) + 'mm' : 'Spitting')}}</span>
</div>
<div class="stat">
<span class="stat-label">Humidity</span>

View File

@@ -61,12 +61,12 @@ function dir(deg: number) {
<div class="forecast-wrap">
<div v-if="days?.length" class="strip">
<div v-for="d in days" class="day">
<div class="day-name">{{ formatDate('ddd, MMM d', new Date(d.time + 'T00:00:00')) }}</div>
<div class="day-name">{{ formatDate('ddd, MMM D', new Date(d.time + 'T00:00:00')) }}</div>
<img :src="BASE + d.icon" class="day-icon" :alt="(d.label?.toString() || '')" />
<div class="day-label">{{ d.label }}</div>
<div class="day-temps">
<span>{{ d.temperature_max || '—' }}</span>
<span class="day-low">{{ d.temperature_min || '—' }}</span>
<span>{{ ~~(d.temperature_max) + '°' || '—' }}</span>
<span class="day-low">{{ ~~(d.temperature_min) + '°' || '—' }}</span>
</div>
<div class="day-humid">🌡 {{ d.humidity || 0 }}%</div>
<div class="day-wind">🍃 {{ ~~(d.wind_gusts as any) || 0 }} Kph ({{dir(d.wind_dir as any)}})</div>