diff --git a/changes/changelog.d/864.enhancement b/changes/changelog.d/864.enhancement new file mode 100644 index 000000000..f903ac850 --- /dev/null +++ b/changes/changelog.d/864.enhancement @@ -0,0 +1 @@ +Redirect from / to /library when user is logged in (#864) diff --git a/front/src/components/Home.vue b/front/src/components/Home.vue index 9393d9b78..bbcc9a8f9 100644 --- a/front/src/components/Home.vue +++ b/front/src/components/Home.vue @@ -147,7 +147,19 @@ export default { let msg = this.$pgettext('Content/Home/List item/Verb', 'Get quality metadata about your music thanks to MusicBrainz') 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 + } } + }