Skip to content

Commit

Permalink
refactor(Location card): move Share action to menu (#705)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn authored Aug 16, 2024
1 parent 2823199 commit ea0e2b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 3 additions & 0 deletions src/components/LocationActionMenuButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<v-icon>mdi-dots-vertical</v-icon>
<v-menu activator="parent" scroll-strategy="close" transition="slide-y-transition">
<v-list>
<ShareLink :overrideUrl="'/locations/' + location.id" display="list-item" />
<v-divider />
<OpenStreetMapLink :location="location" display="list-item" />
</v-list>
</v-menu>
Expand All @@ -14,6 +16,7 @@ import { defineAsyncComponent } from 'vue'
export default {
components: {
ShareLink: defineAsyncComponent(() => import('../components/ShareLink.vue')),
OpenStreetMapLink: defineAsyncComponent(() => import('../components/OpenStreetMapLink.vue'))
},
props: {
Expand Down
10 changes: 2 additions & 8 deletions src/views/LocationDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@
</v-col>
</v-row>

<v-row class="mt-0">
<v-col v-if="locationFound" cols="12">
<ShareLink display="button" />
</v-col>
<v-col v-else cols="12">
<v-row v-if="!locationFound" class="mt-0">
<v-col cols="12">
<v-alert v-if="!loading" type="error" variant="outlined" icon="mdi-alert">
<i>{{ $t('LocationDetail.LocationNotFound') }}</i>
</v-alert>
</v-col>
</v-row>

<br>

<v-row>
<v-col>
<h2 class="text-h6 d-inline mr-2">
Expand Down Expand Up @@ -55,7 +50,6 @@ export default {
FilterMenu: defineAsyncComponent(() => import('../components/FilterMenu.vue')),
OrderMenu: defineAsyncComponent(() => import('../components/OrderMenu.vue')),
PriceCard: defineAsyncComponent(() => import('../components/PriceCard.vue')),
ShareLink: defineAsyncComponent(() => import('../components/ShareLink.vue')),
},
data() {
return {
Expand Down

0 comments on commit ea0e2b8

Please sign in to comment.