diff --git a/app/javascript/flavours/glitch/features/status/components/detailed_status.tsx b/app/javascript/flavours/glitch/features/status/components/detailed_status.tsx index 5014c9545d..ab6489f505 100644 --- a/app/javascript/flavours/glitch/features/status/components/detailed_status.tsx +++ b/app/javascript/flavours/glitch/features/status/components/detailed_status.tsx @@ -6,11 +6,12 @@ import type { CSSProperties } from 'react'; import { useState, useRef, useCallback, useEffect } from 'react'; -import { FormattedMessage } from 'react-intl'; +import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import classNames from 'classnames'; import { Link } from 'react-router-dom'; +import HomeIcon from '@/material-icons/400-24px/home.svg?react'; import { AnimatedNumber } from 'flavours/glitch/components/animated_number'; import AttachmentList from 'flavours/glitch/components/attachment_list'; import { Avatar } from 'flavours/glitch/components/avatar'; @@ -21,6 +22,7 @@ import { FilterWarning } from 'flavours/glitch/components/filter_warning'; import { FormattedDateWrapper } from 'flavours/glitch/components/formatted_date'; import type { StatusLike } from 'flavours/glitch/components/hashtag_bar'; import { getHashtagBarForStatus } from 'flavours/glitch/components/hashtag_bar'; +import { Icon } from 'flavours/glitch/components/icon'; import { IconLogo } from 'flavours/glitch/components/logo'; import MediaGallery from 'flavours/glitch/components/media_gallery'; import { MentionsPlaceholder } from 'flavours/glitch/components/mentions_placeholder'; @@ -40,6 +42,13 @@ import { compareUrls } from 'flavours/glitch/utils/compare_urls'; import Card from './card'; +const messages = defineMessages({ + localOnly: { + id: 'status.local_only', + defaultMessage: 'Only visible from your instance', + }, +}); + interface VideoModalOptions { startTime: number; autoPlay?: boolean; @@ -85,6 +94,7 @@ export const DetailedStatus: React.FC<{ const [height, setHeight] = useState(0); const [showDespiteFilter, setShowDespiteFilter] = useState(false); const nodeRef = useRef(null); + const intl = useIntl(); const letterboxMedia = useAppSelector( (state) => @@ -359,6 +369,18 @@ export const DetailedStatus: React.FC<{ ); + const localOnlyLink = status.get('local_only') ? ( + <> + ยท + + + ) : null; + if (['private', 'direct'].includes(status.get('visibility') as string)) { reblogLink = ''; } else { @@ -547,6 +569,7 @@ export const DetailedStatus: React.FC<{ /> + {localOnlyLink} {visibilityLink} {applicationLink}