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

environments/review-front-deve-otr6gc/deployments/1920
Eliot Berriot 2019-06-21 10:14:20 +02:00
rodzic d8dd76f199
commit 5fd27250e2
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DD6965E2476E5C27
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>