show map on gallery and change name

This commit is contained in:
axolotle
2022-01-03 15:34:23 +01:00
parent eb3828a7f8
commit 79bb45851f
5 changed files with 18 additions and 7 deletions
+5 -3
View File
@@ -5,12 +5,13 @@
no-header
:id="id"
:body-class="{ paddings: !noCross }"
:visible="visible"
>
<template #default="{ hide, visible }">
<template #default="{ hide, visible: visible2 }">
<div v-if="!noCross" class="btn-close-wrapper">
<button-close @click="hide()" />
</div>
<slot name="default" v-bind="{ hide, visible }" />
<slot name="default" v-bind="{ hide, visible: visible2 }" />
</template>
</b-sidebar>
</template>
@@ -21,7 +22,8 @@ export default {
props: {
id: { type: String, required: true },
noCross: { type: Boolean, default: false }
noCross: { type: Boolean, default: false },
visible: { type: Boolean, default: false }
}
}
</script>
+1 -1
View File
@@ -6,7 +6,7 @@
"contact": "Contact",
"library": "Bibliothèque",
"kit": "Kit de désapprentissage",
"gallery": "Créations numériques",
"gallery": "Galerie virtuelle",
"blog": "Blog"
},
"variants": {
+6 -2
View File
@@ -4,7 +4,7 @@
{{ $t('map') }}
</b-button>
<side-view id="gallery-map-side">
<side-view id="gallery-map-side" :visible="mapIsVisible">
<template #default="{ hide, visible }">
<gallery-map
v-if="creations && creation"
@@ -100,7 +100,8 @@ export default {
data () {
return {
intro: ''
intro: '',
mapIsVisible: false
}
},
@@ -126,6 +127,9 @@ export default {
},
created () {
if (this.$route.hash === '#map') {
this.mapIsVisible = true
}
this.$store.dispatch('INIT_GALLERY', parseInt(this.id))
this.$store.dispatch('QUERY_PAGE', 'gallery').then(page => {
this.intro = page.content
+5
View File
@@ -87,6 +87,11 @@ export default {
created () {
this.setDots()
if (this.visible) {
this.$nextTick().then(() => {
this.defineSize()
})
}
}
}
</script>
+1 -1
View File
@@ -29,7 +29,7 @@ export default {
async 'OPEN_CREATION' ({ state, commit, dispatch }, id) {
if (router.currentRoute.name !== 'gallery-view') {
router.push({ name: 'gallery-view', params: { id } })
router.push({ name: 'gallery-view', params: { id }, hash: '#map' })
} else {
router.push({ params: { id } })
}