Add basic support for active weather alerts
yikes nobody should stake their life on how well this works, but it does seem to basically work..
This commit is contained in:
parent
7ed314b5bf
commit
0710f2238c
4 changed files with 134 additions and 2 deletions
|
@ -10,6 +10,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
coordinates: null,
|
||||
alerts: null,
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -48,6 +49,7 @@ export default {
|
|||
|
||||
const forecast = await this.weatherStore.getForecast()
|
||||
this.coordinates = this.weatherStore.coordinates
|
||||
this.alerts = this.weatherStore.alerts
|
||||
},
|
||||
|
||||
getShortForecast(period) {
|
||||
|
@ -77,6 +79,16 @@ export default {
|
|||
</o-select>
|
||||
</o-field>
|
||||
|
||||
<div v-if="alerts?.features?.length">
|
||||
<o-notification variant="warning"
|
||||
icon="warning"
|
||||
@click="$router.push('/alerts')"
|
||||
style="cursor: pointer;">
|
||||
<p class="has-text-weight-bold">Watches In Effect</p>
|
||||
<p>Updated {{ new Date(alerts.updated).toLocaleTimeString('en-US', {timeStyle: 'short'}) }}</p>
|
||||
</o-notification>
|
||||
</div>
|
||||
|
||||
<nav class="panel weather-panel">
|
||||
|
||||
<p class="panel-heading">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue