forked from AkkomaGang/akkoma-fe
Merge branch 'feature/redirect-root-by-login-or-not' into 'develop'
Redirect root by login ro not login See merge request pleroma/pleroma-fe!251
This commit is contained in:
commit
805410b933
2 changed files with 9 additions and 2 deletions
|
@ -98,7 +98,13 @@ window.fetch('/static/config.json')
|
||||||
}
|
}
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{ name: 'root', path: '/', redirect: data['defaultPath'] || '/main/all' },
|
{ name: 'root',
|
||||||
|
path: '/',
|
||||||
|
redirect: to => {
|
||||||
|
var redirectRootLogin = data['redirectRootLogin']
|
||||||
|
var redirectRootNoLogin = data['redirectRootNoLogin']
|
||||||
|
return (store.state.users.currentUser ? redirectRootLogin : redirectRootNoLogin) || '/main/all'
|
||||||
|
}},
|
||||||
{ path: '/main/all', component: PublicAndExternalTimeline },
|
{ path: '/main/all', component: PublicAndExternalTimeline },
|
||||||
{ path: '/main/public', component: PublicTimeline },
|
{ path: '/main/public', component: PublicTimeline },
|
||||||
{ path: '/main/friends', component: FriendsTimeline },
|
{ path: '/main/friends', component: FriendsTimeline },
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
"theme": "pleroma-dark",
|
"theme": "pleroma-dark",
|
||||||
"background": "/static/aurora_borealis.jpg",
|
"background": "/static/aurora_borealis.jpg",
|
||||||
"logo": "/static/logo.png",
|
"logo": "/static/logo.png",
|
||||||
"defaultPath": "/main/all",
|
"redirectRootNoLogin": "/main/all",
|
||||||
|
"redirectRootLogin": "/main/friends",
|
||||||
"chatDisabled": false,
|
"chatDisabled": false,
|
||||||
"showInstanceSpecificPanel": false
|
"showInstanceSpecificPanel": false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue