show map on gallery and change name
This commit is contained in:
@@ -5,12 +5,13 @@
|
|||||||
no-header
|
no-header
|
||||||
:id="id"
|
:id="id"
|
||||||
:body-class="{ paddings: !noCross }"
|
:body-class="{ paddings: !noCross }"
|
||||||
|
:visible="visible"
|
||||||
>
|
>
|
||||||
<template #default="{ hide, visible }">
|
<template #default="{ hide, visible: visible2 }">
|
||||||
<div v-if="!noCross" class="btn-close-wrapper">
|
<div v-if="!noCross" class="btn-close-wrapper">
|
||||||
<button-close @click="hide()" />
|
<button-close @click="hide()" />
|
||||||
</div>
|
</div>
|
||||||
<slot name="default" v-bind="{ hide, visible }" />
|
<slot name="default" v-bind="{ hide, visible: visible2 }" />
|
||||||
</template>
|
</template>
|
||||||
</b-sidebar>
|
</b-sidebar>
|
||||||
</template>
|
</template>
|
||||||
@@ -21,7 +22,8 @@ export default {
|
|||||||
|
|
||||||
props: {
|
props: {
|
||||||
id: { type: String, required: true },
|
id: { type: String, required: true },
|
||||||
noCross: { type: Boolean, default: false }
|
noCross: { type: Boolean, default: false },
|
||||||
|
visible: { type: Boolean, default: false }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"contact": "Contact",
|
"contact": "Contact",
|
||||||
"library": "Bibliothèque",
|
"library": "Bibliothèque",
|
||||||
"kit": "Kit de désapprentissage",
|
"kit": "Kit de désapprentissage",
|
||||||
"gallery": "Créations numériques",
|
"gallery": "Galerie virtuelle",
|
||||||
"blog": "Blog"
|
"blog": "Blog"
|
||||||
},
|
},
|
||||||
"variants": {
|
"variants": {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
{{ $t('map') }}
|
{{ $t('map') }}
|
||||||
</b-button>
|
</b-button>
|
||||||
|
|
||||||
<side-view id="gallery-map-side">
|
<side-view id="gallery-map-side" :visible="mapIsVisible">
|
||||||
<template #default="{ hide, visible }">
|
<template #default="{ hide, visible }">
|
||||||
<gallery-map
|
<gallery-map
|
||||||
v-if="creations && creation"
|
v-if="creations && creation"
|
||||||
@@ -100,7 +100,8 @@ export default {
|
|||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
intro: ''
|
intro: '',
|
||||||
|
mapIsVisible: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -126,6 +127,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
created () {
|
created () {
|
||||||
|
if (this.$route.hash === '#map') {
|
||||||
|
this.mapIsVisible = true
|
||||||
|
}
|
||||||
this.$store.dispatch('INIT_GALLERY', parseInt(this.id))
|
this.$store.dispatch('INIT_GALLERY', parseInt(this.id))
|
||||||
this.$store.dispatch('QUERY_PAGE', 'gallery').then(page => {
|
this.$store.dispatch('QUERY_PAGE', 'gallery').then(page => {
|
||||||
this.intro = page.content
|
this.intro = page.content
|
||||||
|
|||||||
@@ -87,6 +87,11 @@ export default {
|
|||||||
|
|
||||||
created () {
|
created () {
|
||||||
this.setDots()
|
this.setDots()
|
||||||
|
if (this.visible) {
|
||||||
|
this.$nextTick().then(() => {
|
||||||
|
this.defineSize()
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export default {
|
|||||||
|
|
||||||
async 'OPEN_CREATION' ({ state, commit, dispatch }, id) {
|
async 'OPEN_CREATION' ({ state, commit, dispatch }, id) {
|
||||||
if (router.currentRoute.name !== 'gallery-view') {
|
if (router.currentRoute.name !== 'gallery-view') {
|
||||||
router.push({ name: 'gallery-view', params: { id } })
|
router.push({ name: 'gallery-view', params: { id }, hash: '#map' })
|
||||||
} else {
|
} else {
|
||||||
router.push({ params: { id } })
|
router.push({ params: { id } })
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user