From ed3c878e9d51ca84b646f39188d81308ee427dff Mon Sep 17 00:00:00 2001 From: Allen Zhong Date: Wed, 16 Nov 2022 15:59:18 +0800 Subject: [PATCH] disable explore for anonymous users --- .../mastodon/features/explore/index.js | 40 +++++++++++-------- .../ui/components/navigation_panel.js | 2 +- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/app/javascript/mastodon/features/explore/index.js b/app/javascript/mastodon/features/explore/index.js index d91755ff649541..ecc41571a92e02 100644 --- a/app/javascript/mastodon/features/explore/index.js +++ b/app/javascript/mastodon/features/explore/index.js @@ -12,7 +12,7 @@ import Suggestions from './suggestions'; import Search from 'mastodon/features/compose/containers/search_container'; import SearchResults from './results'; import { Helmet } from 'react-helmet'; -import { showTrends } from 'mastodon/initial_state'; +import { timelinePreview, showTrends } from 'mastodon/initial_state'; const messages = defineMessages({ title: { id: 'explore.title', defaultMessage: 'Explore' }, @@ -70,15 +70,21 @@ class Explore extends React.PureComponent { ) : ( <>
- - - - - - - - - + {timelinePreview && ( + + + + )} + {timelinePreview && ( + + + + )} + {timelinePreview && ( + + + + )} {signedIn && ( @@ -86,12 +92,14 @@ class Explore extends React.PureComponent { )}
- - - - - - + {timelinePreview && ( + + + + + + + )} {intl.formatMessage(messages.title)} diff --git a/app/javascript/mastodon/features/ui/components/navigation_panel.js b/app/javascript/mastodon/features/ui/components/navigation_panel.js index 755b19349d79e6..82a0066d84f219 100644 --- a/app/javascript/mastodon/features/ui/components/navigation_panel.js +++ b/app/javascript/mastodon/features/ui/components/navigation_panel.js @@ -99,7 +99,7 @@ class NavigationPanel extends React.Component { - + {(signedIn || timelinePreview) && } ); }