1
0

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
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