pl-fe: remove unused
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -90,7 +90,7 @@ const StatusReplyMentions: React.FC<IStatusReplyMentions> = ({ status, hoverable
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='mb-1 block text-sm text-gray-700 dark:text-gray-600'>
|
<div className='⁂-status-reply-mentions'>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='reply_mentions.reply.hoverable'
|
id='reply_mentions.reply.hoverable'
|
||||||
defaultMessage='<hover>Replying to</hover> {accounts}'
|
defaultMessage='<hover>Replying to</hover> {accounts}'
|
||||||
@ -101,11 +101,7 @@ const StatusReplyMentions: React.FC<IStatusReplyMentions> = ({ status, hoverable
|
|||||||
if (hoverable) {
|
if (hoverable) {
|
||||||
return (
|
return (
|
||||||
<HoverStatusWrapper statusId={status.in_reply_to_id!} inline>
|
<HoverStatusWrapper statusId={status.in_reply_to_id!} inline>
|
||||||
<span
|
<span className='cursor-pointer hover:underline' role='presentation'>
|
||||||
key='hoverstatus'
|
|
||||||
className='cursor-pointer hover:underline'
|
|
||||||
role='presentation'
|
|
||||||
>
|
|
||||||
{children}
|
{children}
|
||||||
</span>
|
</span>
|
||||||
</HoverStatusWrapper>
|
</HoverStatusWrapper>
|
||||||
|
|||||||
@ -7,7 +7,6 @@ import { mentionCompose, replyCompose } from 'pl-fe/actions/compose';
|
|||||||
import { unfilterStatus } from 'pl-fe/actions/statuses';
|
import { unfilterStatus } from 'pl-fe/actions/statuses';
|
||||||
import Card from 'pl-fe/components/ui/card';
|
import Card from 'pl-fe/components/ui/card';
|
||||||
import Icon from 'pl-fe/components/ui/icon';
|
import Icon from 'pl-fe/components/ui/icon';
|
||||||
import Stack from 'pl-fe/components/ui/stack';
|
|
||||||
import Text from 'pl-fe/components/ui/text';
|
import Text from 'pl-fe/components/ui/text';
|
||||||
import AccountContainer from 'pl-fe/containers/account-container';
|
import AccountContainer from 'pl-fe/containers/account-container';
|
||||||
import Emojify from 'pl-fe/features/emoji/emojify';
|
import Emojify from 'pl-fe/features/emoji/emojify';
|
||||||
@ -414,17 +413,15 @@ const Status: React.FC<IStatus> = (props) => {
|
|||||||
<div className='status__content-wrapper'>
|
<div className='status__content-wrapper'>
|
||||||
<StatusReplyMentions status={actualStatus} hoverable={hoverable} />
|
<StatusReplyMentions status={actualStatus} hoverable={hoverable} />
|
||||||
|
|
||||||
<Stack className='relative z-0'>
|
{actualStatus.event ? <EventPreview className='shadow-xl' status={actualStatus} /> : (
|
||||||
{actualStatus.event ? <EventPreview className='shadow-xl' status={actualStatus} /> : (
|
<StatusContent
|
||||||
<StatusContent
|
status={actualStatus}
|
||||||
status={actualStatus}
|
onClick={handleClick}
|
||||||
onClick={handleClick}
|
collapsable
|
||||||
collapsable
|
translatable
|
||||||
translatable
|
withMedia
|
||||||
withMedia
|
/>
|
||||||
/>
|
)}
|
||||||
)}
|
|
||||||
</Stack>
|
|
||||||
|
|
||||||
<StatusReactionsBar status={actualStatus} collapsed />
|
<StatusReactionsBar status={actualStatus} collapsed />
|
||||||
|
|
||||||
|
|||||||
@ -1,43 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import { FormattedMessage } from 'react-intl';
|
|
||||||
|
|
||||||
import Button from 'pl-fe/components/ui/button';
|
|
||||||
import Card, { CardTitle } from 'pl-fe/components/ui/card';
|
|
||||||
import Stack from 'pl-fe/components/ui/stack';
|
|
||||||
import Text from 'pl-fe/components/ui/text';
|
|
||||||
import { useInstance } from 'pl-fe/hooks/use-instance';
|
|
||||||
import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config';
|
|
||||||
|
|
||||||
/** Prompts logged-out users to log in when viewing a thread. */
|
|
||||||
const ThreadLoginCta: React.FC = () => {
|
|
||||||
const instance = useInstance();
|
|
||||||
const { displayCta } = usePlFeConfig();
|
|
||||||
|
|
||||||
if (!displayCta) return null;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Card className='space-y-6 px-6 py-12 text-center' variant='rounded'>
|
|
||||||
<Stack>
|
|
||||||
<CardTitle title={<FormattedMessage id='thread_login.title' defaultMessage='Continue the conversation' />} />
|
|
||||||
<Text>
|
|
||||||
<FormattedMessage
|
|
||||||
id='thread_login.message'
|
|
||||||
defaultMessage='Join {siteTitle} to get the full story and details.'
|
|
||||||
values={{ siteTitle: instance.title }}
|
|
||||||
/>
|
|
||||||
</Text>
|
|
||||||
</Stack>
|
|
||||||
|
|
||||||
<Stack space={4} className='mx-auto max-w-xs'>
|
|
||||||
<Button theme='tertiary' to='/login' block>
|
|
||||||
<FormattedMessage id='thread_login.login' defaultMessage='Log in' />
|
|
||||||
</Button>
|
|
||||||
<Button to='/signup' block>
|
|
||||||
<FormattedMessage id='thread_login.signup' defaultMessage='Sign up' />
|
|
||||||
</Button>
|
|
||||||
</Stack>
|
|
||||||
</Card>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export { ThreadLoginCta as default };
|
|
||||||
@ -1307,7 +1307,6 @@
|
|||||||
"plfe_config.crypto_address.meta_fields.note_placeholder": "Note (optional)",
|
"plfe_config.crypto_address.meta_fields.note_placeholder": "Note (optional)",
|
||||||
"plfe_config.crypto_address.meta_fields.ticker_placeholder": "Ticker",
|
"plfe_config.crypto_address.meta_fields.ticker_placeholder": "Ticker",
|
||||||
"plfe_config.crypto_donate_panel_limit.meta_fields.limit_placeholder": "Number of items to display in the crypto homepage widget",
|
"plfe_config.crypto_donate_panel_limit.meta_fields.limit_placeholder": "Number of items to display in the crypto homepage widget",
|
||||||
"plfe_config.cta_label": "Display call to action panels if not authenticated",
|
|
||||||
"plfe_config.display_fqn_label": "Display domain (eg @user@domain) for local accounts.",
|
"plfe_config.display_fqn_label": "Display domain (eg @user@domain) for local accounts.",
|
||||||
"plfe_config.fields.crypto_addresses_label": "Cryptocurrency addresses",
|
"plfe_config.fields.crypto_addresses_label": "Cryptocurrency addresses",
|
||||||
"plfe_config.fields.edit_theme_label": "Edit theme",
|
"plfe_config.fields.edit_theme_label": "Edit theme",
|
||||||
@ -1775,9 +1774,7 @@
|
|||||||
"theme_toggle.light": "Light",
|
"theme_toggle.light": "Light",
|
||||||
"theme_toggle.system": "System",
|
"theme_toggle.system": "System",
|
||||||
"thread_login.login": "Log in",
|
"thread_login.login": "Log in",
|
||||||
"thread_login.message": "Join {siteTitle} to get the full story and details.",
|
|
||||||
"thread_login.signup": "Sign up",
|
"thread_login.signup": "Sign up",
|
||||||
"thread_login.title": "Continue the conversation",
|
|
||||||
"time_remaining.days": "{number, plural, one {# day} other {# days}} left",
|
"time_remaining.days": "{number, plural, one {# day} other {# days}} left",
|
||||||
"time_remaining.hours": "{number, plural, one {# hour} other {# hours}} left",
|
"time_remaining.hours": "{number, plural, one {# hour} other {# hours}} left",
|
||||||
"time_remaining.minutes": "{number, plural, one {# minute} other {# minutes}} left",
|
"time_remaining.minutes": "{number, plural, one {# minute} other {# minutes}} left",
|
||||||
|
|||||||
@ -72,7 +72,6 @@ const plFeConfigSchema = coerceObject({
|
|||||||
authenticatedProfile: v.fallback(v.boolean(), false),
|
authenticatedProfile: v.fallback(v.boolean(), false),
|
||||||
linkFooterMessage: v.fallback(v.string(), ''),
|
linkFooterMessage: v.fallback(v.string(), ''),
|
||||||
links: v.fallback(v.record(v.string(), v.string()), {}),
|
links: v.fallback(v.record(v.string(), v.string()), {}),
|
||||||
displayCta: v.fallback(v.boolean(), false),
|
|
||||||
tileServer: v.fallback(v.string(), ''),
|
tileServer: v.fallback(v.string(), ''),
|
||||||
tileServerAttribution: v.fallback(v.string(), ''),
|
tileServerAttribution: v.fallback(v.string(), ''),
|
||||||
redirectRootNoLogin: v.fallback(v.pipe(v.string(), v.transform((url: string) => {
|
redirectRootNoLogin: v.fallback(v.pipe(v.string(), v.transform((url: string) => {
|
||||||
|
|||||||
@ -42,7 +42,6 @@ const messages = defineMessages({
|
|||||||
greentextLabel: { id: 'plfe_config.greentext_label', defaultMessage: 'Enable greentext support' },
|
greentextLabel: { id: 'plfe_config.greentext_label', defaultMessage: 'Enable greentext support' },
|
||||||
authenticatedProfileLabel: { id: 'plfe_config.authenticated_profile_label', defaultMessage: 'Profiles require authentication' },
|
authenticatedProfileLabel: { id: 'plfe_config.authenticated_profile_label', defaultMessage: 'Profiles require authentication' },
|
||||||
authenticatedProfileHint: { id: 'plfe_config.authenticated_profile_hint', defaultMessage: 'Users must be logged-in to view replies and media on user profiles.' },
|
authenticatedProfileHint: { id: 'plfe_config.authenticated_profile_hint', defaultMessage: 'Users must be logged-in to view replies and media on user profiles.' },
|
||||||
displayCtaLabel: { id: 'plfe_config.cta_label', defaultMessage: 'Display call to action panels if not authenticated' },
|
|
||||||
mediaPreviewLabel: { id: 'plfe_config.media_preview_label', defaultMessage: 'Prefer preview media for thumbnails' },
|
mediaPreviewLabel: { id: 'plfe_config.media_preview_label', defaultMessage: 'Prefer preview media for thumbnails' },
|
||||||
mediaPreviewHint: { id: 'plfe_config.media_preview_hint', defaultMessage: 'Some backends provide an optimized version of media for display in timelines. However, these preview images may be too small without additional configuration.' },
|
mediaPreviewHint: { id: 'plfe_config.media_preview_hint', defaultMessage: 'Some backends provide an optimized version of media for display in timelines. However, these preview images may be too small without additional configuration.' },
|
||||||
tileServerLabel: { id: 'plfe_config.tile_server_label', defaultMessage: 'Map tile server' },
|
tileServerLabel: { id: 'plfe_config.tile_server_label', defaultMessage: 'Map tile server' },
|
||||||
@ -268,13 +267,6 @@ const PlFeConfigEditor: React.FC = () => {
|
|||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
|
|
||||||
<ListItem label={intl.formatMessage(messages.displayCtaLabel)}>
|
|
||||||
<Toggle
|
|
||||||
checked={plFe.displayCta === true}
|
|
||||||
onChange={handleChange('displayCta', (e) => e.target.checked)}
|
|
||||||
/>
|
|
||||||
</ListItem>
|
|
||||||
|
|
||||||
<ListItem
|
<ListItem
|
||||||
label={intl.formatMessage(messages.authenticatedProfileLabel)}
|
label={intl.formatMessage(messages.authenticatedProfileLabel)}
|
||||||
hint={intl.formatMessage(messages.authenticatedProfileHint)}
|
hint={intl.formatMessage(messages.authenticatedProfileHint)}
|
||||||
|
|||||||
@ -11,10 +11,8 @@ import Column from 'pl-fe/components/ui/column';
|
|||||||
import Stack from 'pl-fe/components/ui/stack';
|
import Stack from 'pl-fe/components/ui/stack';
|
||||||
import PlaceholderStatus from 'pl-fe/features/placeholder/components/placeholder-status';
|
import PlaceholderStatus from 'pl-fe/features/placeholder/components/placeholder-status';
|
||||||
import Thread from 'pl-fe/features/status/components/thread';
|
import Thread from 'pl-fe/features/status/components/thread';
|
||||||
import ThreadLoginCta from 'pl-fe/features/status/components/thread-login-cta';
|
|
||||||
import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch';
|
import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch';
|
||||||
import { useAppSelector } from 'pl-fe/hooks/use-app-selector';
|
import { useAppSelector } from 'pl-fe/hooks/use-app-selector';
|
||||||
import { useLoggedIn } from 'pl-fe/hooks/use-logged-in';
|
|
||||||
import { makeGetStatus } from 'pl-fe/selectors';
|
import { makeGetStatus } from 'pl-fe/selectors';
|
||||||
import { useSettings } from 'pl-fe/stores/settings';
|
import { useSettings } from 'pl-fe/stores/settings';
|
||||||
|
|
||||||
@ -51,7 +49,6 @@ interface IStatusDetails {
|
|||||||
const StatusPage: React.FC<IStatusDetails> = (props) => {
|
const StatusPage: React.FC<IStatusDetails> = (props) => {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const { isLoggedIn } = useLoggedIn();
|
|
||||||
|
|
||||||
const getStatus = useCallback(makeGetStatus(), []);
|
const getStatus = useCallback(makeGetStatus(), []);
|
||||||
const status = useAppSelector((state) => getStatus(state, { id: props.params.statusId }));
|
const status = useAppSelector((state) => getStatus(state, { id: props.params.statusId }));
|
||||||
@ -149,8 +146,6 @@ const StatusPage: React.FC<IStatusDetails> = (props) => {
|
|||||||
<Thread key={status.id} status={status} setExpandAllStatuses={(fn) => setExpandAllStatuses(() => fn)} />
|
<Thread key={status.id} status={status} setExpandAllStatuses={(fn) => setExpandAllStatuses(() => fn)} />
|
||||||
</PullToRefresh>
|
</PullToRefresh>
|
||||||
</Column>
|
</Column>
|
||||||
|
|
||||||
{!isLoggedIn && <ThreadLoginCta />}
|
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user