Split timeline_preview setting into more granular settings (#36338)
This commit is contained in:
parent
62f91eddf4
commit
2d2c525097
88 changed files with 156 additions and 173 deletions
|
|
@ -13,7 +13,7 @@ import { changeSetting } from 'mastodon/actions/settings';
|
|||
import { connectPublicStream, connectCommunityStream } from 'mastodon/actions/streaming';
|
||||
import { expandPublicTimeline, expandCommunityTimeline } from 'mastodon/actions/timelines';
|
||||
import { DismissableBanner } from 'mastodon/components/dismissable_banner';
|
||||
import { domain } from 'mastodon/initial_state';
|
||||
import { localLiveFeedAccess, remoteLiveFeedAccess, me, domain } from 'mastodon/initial_state';
|
||||
import { useAppDispatch, useAppSelector } from 'mastodon/store';
|
||||
|
||||
import Column from '../../components/column';
|
||||
|
|
@ -165,19 +165,21 @@ const Firehose = ({ feedType, multiColumn }) => {
|
|||
<ColumnSettings />
|
||||
</ColumnHeader>
|
||||
|
||||
<div className='account__section-headline'>
|
||||
<NavLink exact to='/public/local'>
|
||||
<FormattedMessage tagName='div' id='firehose.local' defaultMessage='This server' />
|
||||
</NavLink>
|
||||
{(signedIn || (localLiveFeedAccess === 'public' && remoteLiveFeedAccess === 'public')) && (
|
||||
<div className='account__section-headline'>
|
||||
<NavLink exact to='/public/local'>
|
||||
<FormattedMessage tagName='div' id='firehose.local' defaultMessage='This server' />
|
||||
</NavLink>
|
||||
|
||||
<NavLink exact to='/public/remote'>
|
||||
<FormattedMessage tagName='div' id='firehose.remote' defaultMessage='Other servers' />
|
||||
</NavLink>
|
||||
<NavLink exact to='/public/remote'>
|
||||
<FormattedMessage tagName='div' id='firehose.remote' defaultMessage='Other servers' />
|
||||
</NavLink>
|
||||
|
||||
<NavLink exact to='/public'>
|
||||
<FormattedMessage tagName='div' id='firehose.all' defaultMessage='All' />
|
||||
</NavLink>
|
||||
</div>
|
||||
<NavLink exact to='/public'>
|
||||
<FormattedMessage tagName='div' id='firehose.all' defaultMessage='All' />
|
||||
</NavLink>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<StatusListContainer
|
||||
prepend={prependBanner}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,12 @@ import { Search } from 'mastodon/features/compose/components/search';
|
|||
import { ColumnLink } from 'mastodon/features/ui/components/column_link';
|
||||
import { useBreakpoint } from 'mastodon/features/ui/hooks/useBreakpoint';
|
||||
import { useIdentity } from 'mastodon/identity_context';
|
||||
import { timelinePreview, trendsEnabled, me } from 'mastodon/initial_state';
|
||||
import {
|
||||
localLiveFeedAccess,
|
||||
remoteLiveFeedAccess,
|
||||
trendsEnabled,
|
||||
me,
|
||||
} from 'mastodon/initial_state';
|
||||
import { transientSingleColumn } from 'mastodon/is_mobile';
|
||||
import { selectUnreadNotificationGroupsCount } from 'mastodon/selectors/notifications';
|
||||
import { useAppSelector, useAppDispatch } from 'mastodon/store';
|
||||
|
|
@ -257,10 +262,16 @@ export const NavigationPanel: React.FC<{ multiColumn?: boolean }> = ({
|
|||
/>
|
||||
)}
|
||||
|
||||
{(signedIn || timelinePreview) && (
|
||||
{(signedIn ||
|
||||
localLiveFeedAccess === 'public' ||
|
||||
remoteLiveFeedAccess === 'public') && (
|
||||
<ColumnLink
|
||||
transparent
|
||||
to='/public/local'
|
||||
to={
|
||||
signedIn || localLiveFeedAccess === 'public'
|
||||
? '/public/local'
|
||||
: '/public/remote'
|
||||
}
|
||||
icon='globe'
|
||||
iconComponent={PublicIcon}
|
||||
isActive={isFirehoseActive}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ interface InitialStateMeta {
|
|||
single_user_mode: boolean;
|
||||
source_url: string;
|
||||
streaming_api_base_url: string;
|
||||
timeline_preview: boolean;
|
||||
local_live_feed_access: 'public' | 'authenticated';
|
||||
remote_live_feed_access: 'public' | 'authenticated';
|
||||
title: string;
|
||||
show_trends: boolean;
|
||||
trends_as_landing_page: boolean;
|
||||
|
|
@ -110,7 +111,8 @@ export const trendsEnabled = getMeta('trends_enabled');
|
|||
export const showTrends = getMeta('show_trends');
|
||||
export const singleUserMode = getMeta('single_user_mode');
|
||||
export const source_url = getMeta('source_url');
|
||||
export const timelinePreview = getMeta('timeline_preview');
|
||||
export const localLiveFeedAccess = getMeta('local_live_feed_access');
|
||||
export const remoteLiveFeedAccess = getMeta('remote_live_feed_access');
|
||||
export const title = getMeta('title');
|
||||
export const trendsAsLanding = getMeta('trends_as_landing_page');
|
||||
export const useBlurhash = getMeta('use_blurhash');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue