mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-16 09:18:46 +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 { expandPublicTimeline, expandCommunityTimeline } from 'flavours/glitch/actions/timelines';
|
||||||
import { DismissableBanner } from 'flavours/glitch/components/dismissable_banner';
|
import { DismissableBanner } from 'flavours/glitch/components/dismissable_banner';
|
||||||
import SettingText from 'flavours/glitch/components/setting_text';
|
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 { useAppDispatch, useAppSelector } from 'flavours/glitch/store';
|
||||||
|
|
||||||
import Column from '../../components/column';
|
import Column from '../../components/column';
|
||||||
@@ -191,6 +191,7 @@ const Firehose = ({ feedType, multiColumn }) => {
|
|||||||
<ColumnSettings />
|
<ColumnSettings />
|
||||||
</ColumnHeader>
|
</ColumnHeader>
|
||||||
|
|
||||||
|
{(signedIn || (localLiveFeedAccess === 'public' && remoteLiveFeedAccess === 'public')) && (
|
||||||
<div className='account__section-headline'>
|
<div className='account__section-headline'>
|
||||||
<NavLink exact to='/public/local'>
|
<NavLink exact to='/public/local'>
|
||||||
<FormattedMessage tagName='div' id='firehose.local' defaultMessage='This server' />
|
<FormattedMessage tagName='div' id='firehose.local' defaultMessage='This server' />
|
||||||
@@ -204,6 +205,7 @@ const Firehose = ({ feedType, multiColumn }) => {
|
|||||||
<FormattedMessage tagName='div' id='firehose.all' defaultMessage='All' />
|
<FormattedMessage tagName='div' id='firehose.all' defaultMessage='All' />
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<StatusListContainer
|
<StatusListContainer
|
||||||
prepend={prependBanner}
|
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 { useBreakpoint } from 'flavours/glitch/features/ui/hooks/useBreakpoint';
|
||||||
import { useIdentity } from 'flavours/glitch/identity_context';
|
import { useIdentity } from 'flavours/glitch/identity_context';
|
||||||
import {
|
import {
|
||||||
timelinePreview,
|
localLiveFeedAccess,
|
||||||
|
remoteLiveFeedAccess,
|
||||||
trendsEnabled,
|
trendsEnabled,
|
||||||
me,
|
me,
|
||||||
} from 'flavours/glitch/initial_state';
|
} from 'flavours/glitch/initial_state';
|
||||||
@@ -285,10 +286,16 @@ export const NavigationPanel: React.FC<{ multiColumn?: boolean }> = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{(signedIn || timelinePreview) && (
|
{(signedIn ||
|
||||||
|
localLiveFeedAccess === 'public' ||
|
||||||
|
remoteLiveFeedAccess === 'public') && (
|
||||||
<ColumnLink
|
<ColumnLink
|
||||||
transparent
|
transparent
|
||||||
to='/public/local'
|
to={
|
||||||
|
signedIn || localLiveFeedAccess === 'public'
|
||||||
|
? '/public/local'
|
||||||
|
: '/public/remote'
|
||||||
|
}
|
||||||
icon='globe'
|
icon='globe'
|
||||||
iconComponent={PublicIcon}
|
iconComponent={PublicIcon}
|
||||||
isActive={isFirehoseActive}
|
isActive={isFirehoseActive}
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ interface InitialStateMeta {
|
|||||||
single_user_mode: boolean;
|
single_user_mode: boolean;
|
||||||
source_url: string;
|
source_url: string;
|
||||||
streaming_api_base_url: string;
|
streaming_api_base_url: string;
|
||||||
timeline_preview: boolean;
|
local_live_feed_access: 'public' | 'authenticated';
|
||||||
|
remote_live_feed_access: 'public' | 'authenticated';
|
||||||
title: string;
|
title: string;
|
||||||
show_trends: boolean;
|
show_trends: boolean;
|
||||||
trends_as_landing_page: boolean;
|
trends_as_landing_page: boolean;
|
||||||
@@ -138,7 +139,8 @@ export const trendsEnabled = getMeta('trends_enabled');
|
|||||||
export const showTrends = getMeta('show_trends');
|
export const showTrends = getMeta('show_trends');
|
||||||
export const singleUserMode = getMeta('single_user_mode');
|
export const singleUserMode = getMeta('single_user_mode');
|
||||||
export const source_url = getMeta('source_url');
|
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 title = getMeta('title');
|
||||||
export const trendsAsLanding = getMeta('trends_as_landing_page');
|
export const trendsAsLanding = getMeta('trends_as_landing_page');
|
||||||
export const useBlurhash = getMeta('use_blurhash');
|
export const useBlurhash = getMeta('use_blurhash');
|
||||||
|
|||||||
Reference in New Issue
Block a user