31 lines
1.2 KiB
Diff
31 lines
1.2 KiB
Diff
|
From 1ae09458c6450642b74fd79674d7ab935b76ac02 Mon Sep 17 00:00:00 2001
|
||
|
From: Oneric <oneric@oneric.stub>
|
||
|
Date: Sat, 28 Sep 2024 17:47:28 +0200
|
||
|
Subject: [PATCH] Fix redirect on logout
|
||
|
|
||
|
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
|
||
|
---
|
||
|
src/components/settings_modal/settings_modal.js | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/components/settings_modal/settings_modal.js b/src/components/settings_modal/settings_modal.js
|
||
|
index 27dab3ec..9a2df9b0 100644
|
||
|
--- a/src/components/settings_modal/settings_modal.js
|
||
|
+++ b/src/components/settings_modal/settings_modal.js
|
||
|
@@ -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')
|
||
|
},
|
||
|
--
|
||
|
2.34.1
|
||
|
|