[Glitch] Add a new setting to choose the server landing page

Port 779a1f8448 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Renaud Chaput authored and Claire committed 2025-10-28 20:26:40 +01:00
1 parent 5f3f75559f
commit 5a051d07c6
2 files changed
+6 -4

No files matched your search

@@ -30,7 +30,7 @@ import { uploadCompose, resetCompose, changeComposeSpoilerness } from '../../act
import { clearHeight } from '../../actions/height_cache';
import { fetchServer, fetchServerTranslationLanguages } from '../../actions/server';
import { expandHomeTimeline } from '../../actions/timelines';
import { initialState, me, owner, singleUserMode, trendsEnabled, trendsAsLanding, disableHoverCards, autoPlayGif } from '../../initial_state';
import { initialState, me, owner, singleUserMode, trendsEnabled, landingPage, localLiveFeedAccess, disableHoverCards, autoPlayGif } from '../../initial_state';
import BundleColumnError from './components/bundle_column_error';
import { NavigationBar } from './components/navigation_bar';
@@ -156,8 +156,10 @@ class SwitchingColumnsArea extends PureComponent {
}
} else if (singleUserMode && owner && initialState?.accounts[owner]) {
redirect = <Redirect from='/' to={`/@${initialState.accounts[owner].username}`} exact />;
} else if (trendsEnabled && trendsAsLanding) {
} else if (trendsEnabled && landingPage === 'trends') {
redirect = <Redirect from='/' to='/explore' exact />;
} else if (localLiveFeedAccess === 'public' && landingPage === 'local_feed') {
redirect = <Redirect from='/' to='/public/local' exact />;
} else {
redirect = <Redirect from='/' to='/about' exact />;
}