From 5d4d4a69f65ea8612d6e992282c061ba9a01a8be Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Thu, 13 Oct 2022 04:07:30 +0900 Subject: [Glitch] Redirect non-logged-in user to owner statuses on single user mode Port 7afc6a630c76fb071bd189af3ac1366efc82f819 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/features/ui/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/javascript/flavours/glitch/features') diff --git a/app/javascript/flavours/glitch/features/ui/index.js b/app/javascript/flavours/glitch/features/ui/index.js index d5abefb19..eb5c3e87b 100644 --- a/app/javascript/flavours/glitch/features/ui/index.js +++ b/app/javascript/flavours/glitch/features/ui/index.js @@ -56,7 +56,7 @@ import { PrivacyPolicy, } from './util/async-components'; import { HotKeys } from 'react-hotkeys'; -import { me } from 'flavours/glitch/initial_state'; +import initialState, { me, owner, singleUserMode } from '../../initial_state'; import { closeOnboarding, INTRODUCTION_VERSION } from 'flavours/glitch/actions/onboarding'; import { defineMessages, FormattedMessage, injectIntl } from 'react-intl'; import { Helmet } from 'react-helmet'; @@ -175,6 +175,8 @@ class SwitchingColumnsArea extends React.PureComponent { } else { redirect = ; } + } else if (singleUserMode && owner && initialState?.accounts[owner]) { + redirect = ; } else { redirect = ; } -- cgit