Skip to content
Snippets Groups Projects
Commit 7dab0799 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Merge branch '864-redirection-logged-in' into 'develop'

Fix #864: Redirect from / to /library when user is logged in

Closes #864

See merge request funkwhale/funkwhale!792
parents f0ab2b75 5fd27250
No related branches found
No related tags found
No related merge requests found
Redirect from / to /library when user is logged in (#864)
......@@ -147,7 +147,19 @@ export default {
let msg = this.$pgettext('Content/Home/List item/Verb', 'Get quality metadata about your music thanks to <a href="%{ url }" target="_blank">MusicBrainz</a>')
return this.$gettextInterpolate(msg, {url: this.musicbrainzUrl})
}
},
watch: {
'$store.state.auth.authenticated': {
handler (v) {
if (v) {
console.log('Authenticated, redirecting to /library…')
this.$router.push('/library')
}
},
immediate: true
}
}
}
</script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment