mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 16:59:41 +00:00
[Glitch] Split timeline_preview setting into more granular settings
Port 2d2c525097 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -14,7 +14,7 @@ import { connectPublicStream, connectCommunityStream } from 'flavours/glitch/act
|
||||
import { expandPublicTimeline, expandCommunityTimeline } from 'flavours/glitch/actions/timelines';
|
||||
import { DismissableBanner } from 'flavours/glitch/components/dismissable_banner';
|
||||
import SettingText from 'flavours/glitch/components/setting_text';
|
||||
import { domain } from 'flavours/glitch/initial_state';
|
||||
import { localLiveFeedAccess, remoteLiveFeedAccess, me, domain } from 'flavours/glitch/initial_state';
|
||||
import { useAppDispatch, useAppSelector } from 'flavours/glitch/store';
|
||||
|
||||
import Column from '../../components/column';
|
||||
@@ -191,19 +191,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}
|
||||
|
||||
@@ -41,7 +41,8 @@ import { ColumnLink } from 'flavours/glitch/features/ui/components/column_link';
|
||||
import { useBreakpoint } from 'flavours/glitch/features/ui/hooks/useBreakpoint';
|
||||
import { useIdentity } from 'flavours/glitch/identity_context';
|
||||
import {
|
||||
timelinePreview,
|
||||
localLiveFeedAccess,
|
||||
remoteLiveFeedAccess,
|
||||
trendsEnabled,
|
||||
me,
|
||||
} from 'flavours/glitch/initial_state';
|
||||
@@ -285,10 +286,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}
|
||||
|
||||
@@ -34,7 +34,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;
|
||||
@@ -138,7 +139,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');
|
||||
|
||||
Reference in New Issue
Block a user