1
0

feat(views): load views when navigating with link share

This commit is contained in:
kolaente
2024-03-16 12:31:10 +01:00
parent 4170f5468f
commit a3714c74fd
4 changed files with 21 additions and 31 deletions

View File

@ -49,7 +49,6 @@ import {useI18n} from 'vue-i18n'
import {useTitle} from '@vueuse/core'
import Message from '@/components/misc/message.vue'
import {PROJECT_VIEWS, type ProjectView} from '@/types/ProjectView'
import {LINK_SHARE_HASH_PREFIX} from '@/constants/linkShareHash'
import {useBaseStore} from '@/stores/base'
@ -96,10 +95,6 @@ function useAuth() {
: true
baseStore.setLogoVisible(logoVisible)
const view = route.query.view && Object.values(PROJECT_VIEWS).includes(route.query.view as ProjectView)
? route.query.view
: 'list'
const hash = LINK_SHARE_HASH_PREFIX + route.params.share
const last = getLastVisitedRoute()
@ -111,8 +106,11 @@ function useAuth() {
}
return router.push({
name: `project.${view}`,
params: {projectId},
name: 'project.view',
params: {
projectId,
viewId: route.query.view
},
hash,
})
} catch (e) {