Fix redirect on logout
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful

An instance may restrict access to the public timeline (among others)
to authenticated users and there already is a setting to decide which page
to show authenticated and unauthenticated viewers by default each.
However, the logout redirect didn't honour this setting
leading to potentially broken pages and errors on logout
This commit is contained in:
Oneric 2024-09-28 17:47:28 +02:00
parent f391cf70a4
commit 1ae09458c6

View file

@ -69,7 +69,7 @@ const SettingsModal = {
this.$store.dispatch('closeSettingsModal')
},
logout () {
this.$router.replace('/main/public')
this.$router.replace(this.$store.state.instance.redirectRootNoLogin || '/main/all')
this.$store.dispatch('closeSettingsModal')
this.$store.dispatch('logout')
},