display images, videos & files in text body
This commit is contained in:
@@ -15,7 +15,7 @@ export default {
|
||||
async 'INIT_GALLERY' ({ state, commit, dispatch, getters }, id) {
|
||||
const ids = await dispatch('GET_ALL_NODES_IDS', { variant: 'creation', dataLevel: 'full' })
|
||||
if (isNaN(id)) {
|
||||
dispatch('OPEN_CREATION', ids[ids.length - 1])
|
||||
dispatch('OPEN_CREATION', { id: ids[ids.length - 1] })
|
||||
} else {
|
||||
dispatch('DISPLAY_CREATION', id)
|
||||
}
|
||||
@@ -27,9 +27,9 @@ export default {
|
||||
commit('ADD_HISTORY_ENTRIES', [id])
|
||||
},
|
||||
|
||||
async 'OPEN_CREATION' ({ state, commit, dispatch }, id) {
|
||||
async 'OPEN_CREATION' ({ state, commit, dispatch }, { id, map = true }) {
|
||||
if (router.currentRoute.name !== 'gallery-view') {
|
||||
router.push({ name: 'gallery-view', params: { id }, hash: '#map' })
|
||||
router.push({ name: 'gallery-view', params: { id }, hash: map ? '#map' : '' })
|
||||
} else {
|
||||
router.push({ params: { id } })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user