diff --git a/app/actions/ModActionPanel/QuickAction.tsx b/app/actions/ModActionPanel/QuickAction.tsx index b31f7b6..fdf5e69 100644 --- a/app/actions/ModActionPanel/QuickAction.tsx +++ b/app/actions/ModActionPanel/QuickAction.tsx @@ -596,7 +596,10 @@ function Form(
{!isSubjectDid && record?.repo && ( diff --git a/components/common/PreviewCard.tsx b/components/common/PreviewCard.tsx index 1811915..04cf6c8 100644 --- a/components/common/PreviewCard.tsx +++ b/components/common/PreviewCard.tsx @@ -29,9 +29,11 @@ export function PreviewCard({ children, className, isAuthorDeactivated, + isAuthorTakendown, }: { subject: string isAuthorDeactivated?: boolean + isAuthorTakendown?: boolean title?: string | ReactNode children?: ReactNode className?: string @@ -43,7 +45,11 @@ export function PreviewCard({

{displayTitle}

- + {children}
) diff --git a/components/common/RecordCard.tsx b/components/common/RecordCard.tsx index d142119..fdb7d97 100644 --- a/components/common/RecordCard.tsx +++ b/components/common/RecordCard.tsx @@ -21,8 +21,14 @@ export function RecordCard(props: { uri: string showLabels?: boolean isAuthorDeactivated?: boolean + isAuthorTakendown?: boolean }) { - const { uri, showLabels = false, isAuthorDeactivated } = props + const { + uri, + showLabels = false, + isAuthorDeactivated, + isAuthorTakendown, + } = props const parsed = parseAtUri(uri) if (!parsed) { return null @@ -32,6 +38,7 @@ export function RecordCard(props: { ) @@ -66,10 +73,12 @@ export function RecordCard(props: { function PostCard({ uri, showLabels, + isAuthorTakendown, isAuthorDeactivated, }: { uri: string showLabels?: boolean + isAuthorTakendown?: boolean isAuthorDeactivated?: boolean }) { const labelerAgent = useLabelerAgent() @@ -136,6 +145,7 @@ function PostCard({ dense showLabels={showLabels} item={{ post: data.thread.post }} + isAuthorTakendown={isAuthorTakendown} isAuthorDeactivated={isAuthorDeactivated} controls={['like', 'repost', 'workspace']} /> diff --git a/components/common/posts/PostsFeed.tsx b/components/common/posts/PostsFeed.tsx index 5f17d18..9d74088 100644 --- a/components/common/posts/PostsFeed.tsx +++ b/components/common/posts/PostsFeed.tsx @@ -89,11 +89,13 @@ export function PostAsCard({ className = '', showLabels = true, isAuthorDeactivated, + isAuthorTakendown, controls = [...PostControlOptions], }: { item: AppBskyFeedDefs.FeedViewPost dense?: boolean isAuthorDeactivated?: boolean + isAuthorTakendown?: boolean controls?: PostControl[] onReport?: (uri: string) => void className?: string @@ -103,7 +105,11 @@ export function PostAsCard({
- + {showLabels && } {!!controls?.length && ( @@ -242,8 +248,10 @@ const getImageSizeClass = (imageCount: number) => export function PostEmbeds({ item, + isAuthorTakendown, isAuthorDeactivated, }: { + isAuthorTakendown?: boolean isAuthorDeactivated?: boolean item: AppBskyFeedDefs.FeedViewPost }) { @@ -265,10 +273,12 @@ export function PostEmbeds({ const captions = item.post.record?.['embed']?.['captions'] const sourceUrl = getVideoUrlWithFallback(embed.playlist, { isAuthorDeactivated, + isAuthorTakendown, }) const thumbnailUrl = embed.thumbnail ? getVideoUrlWithFallback(embed.thumbnail, { isAuthorDeactivated, + isAuthorTakendown, }) : undefined return ( diff --git a/components/common/video/helpers.ts b/components/common/video/helpers.ts index fb10aef..a3bf18f 100644 --- a/components/common/video/helpers.ts +++ b/components/common/video/helpers.ts @@ -2,14 +2,14 @@ import { FALLBACK_VIDEO_URL } from '@/lib/constants' export const getVideoUrlWithFallback = ( originalUri: string, - opts?: { isAuthorDeactivated?: boolean }, + opts?: { isAuthorDeactivated?: boolean; isAuthorTakendown?: boolean }, ): string => { const [find, replace] = FALLBACK_VIDEO_URL if (!find || !replace) { return originalUri } - if (!opts?.isAuthorDeactivated) { + if (!opts?.isAuthorDeactivated && !opts?.isAuthorTakendown) { return originalUri }