display images, videos & files in text body

This commit is contained in:
axolotle
2022-01-22 17:06:37 +01:00
parent 25b5055d5f
commit d66230f8d3
4 changed files with 40 additions and 23 deletions
+3 -3
View File
@@ -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 } })
}