feat(link shares): allows switching the initial view by passing a query parameter

This commit is contained in:
kolaente 2022-09-07 22:29:54 +02:00
parent 63f5f446fd
commit d3171b59be
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
3 changed files with 48 additions and 11 deletions

View file

@ -79,7 +79,15 @@ function useAuth() {
? route.query.logoVisible === 'true'
: true
store.commit(LOGO_VISIBLE, logoVisible)
router.push({name: 'list.list', params: {listId}})
let view = 'list'
if (route.query.view &&
(route.query.view === 'gantt' ||
route.query.view === 'kanban' ||
route.query.view === 'table')) {
view = route.query.view
}
router.push({name: `list.${view}`, params: {listId}})
} catch (e: any) {
if (e.response?.data?.code === 13001) {
authenticateWithPassword.value = true