Basic app functions are working
definitely on the "minimal" side but this *mostly* covers my own usage of the old mobile.weather.gov app
This commit is contained in:
parent
397b7b02e5
commit
5a584982e4
28 changed files with 2020 additions and 473 deletions
62
src/views/EditListView.vue
Normal file
62
src/views/EditListView.vue
Normal file
|
@ -0,0 +1,62 @@
|
|||
<script setup>
|
||||
import { mapStores } from 'pinia'
|
||||
import { useLocationStore } from '../stores/location'
|
||||
</script>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
computed: {
|
||||
...mapStores(useLocationStore),
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
deleteLocation(location) {
|
||||
this.locationStore.removeLocation(location)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main>
|
||||
|
||||
<o-button variant="primary"
|
||||
size="small"
|
||||
icon-left="arrow-left"
|
||||
@click="$router.push('/')">
|
||||
Back
|
||||
</o-button>
|
||||
|
||||
<h5 class="is-size-5">Saved Locations</h5>
|
||||
<br />
|
||||
|
||||
<div v-for="location in locationStore.locations"
|
||||
:key="location.coordinates"
|
||||
class="block location">
|
||||
<div>
|
||||
<p>{{ location.cityState }}</p>
|
||||
<p class="is-size-7">{{ location.coordinates }}</p>
|
||||
</div>
|
||||
<o-button variant="danger"
|
||||
size="small"
|
||||
@click="deleteLocation(location)">
|
||||
<o-icon icon="trash" />
|
||||
</o-button>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
div.location {
|
||||
border: 1px solid black;
|
||||
border-radius: 5px;
|
||||
padding: 1rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue