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
environments/review-front-deve-otr6gc/deployments/1920
Eliot Berriot 2019-06-24 13:31:14 +02:00
commit 7dab07993b
2 zmienionych plików z 13 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1 @@
Redirect from / to /library when user is logged in (#864)

Wyświetl plik

@ -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>') 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}) 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> </script>