diff --git a/src/components/Post/Embed/LazyQuoteEmbed.tsx b/src/components/Post/Embed/LazyQuoteEmbed.tsx index fdc1c63091..117b88d1d0 100644 --- a/src/components/Post/Embed/LazyQuoteEmbed.tsx +++ b/src/components/Post/Embed/LazyQuoteEmbed.tsx @@ -6,7 +6,13 @@ import {useResolveLinkQuery} from '#/state/queries/resolve-link' import {atoms as a, useTheme} from '#/alf' import {QuoteEmbed} from '#/components/Post/Embed' -export function LazyQuoteEmbed({uri}: {uri: string}) { +export function LazyQuoteEmbed({ + uri, + linkDisabled, +}: { + uri: string + linkDisabled?: boolean +}) { const t = useTheme() const {data} = useResolveLinkQuery(uri) @@ -21,6 +27,7 @@ export function LazyQuoteEmbed({uri}: {uri: string}) { type: 'post', view, }} + linkDisabled={linkDisabled} /> ) : ( & { embed: EmbedType<'post'> viewContext?: QuoteEmbedViewContext + linkDisabled?: boolean }) { const moderationOpts = useModerationOpts() const quote = useMemo<$Typed>( @@ -280,11 +282,48 @@ export function QuoteEmbed({ onIn: onPressIn, onOut: onPressOut, } = useInteractionState() + + const contents = ( + <> + + + + {moderation ? ( + + ) : null} + {richText ? ( + + ) : null} + {quote.embed && ( + + )} + + ) + return ( + onPointerEnter={linkDisabled ? undefined : onPointerEnter} + onPointerLeave={linkDisabled ? undefined : onPointerLeave}> {({active}) => ( <> - {!active && ( + {!active && !linkDisabled && ( )} - - - + {linkDisabled ? ( + + {contents} - {moderation ? ( - - ) : null} - {richText ? ( - - ) : null} - {quote.embed && ( - - )} - + ) : ( + + {contents} + + )} )} diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index 53d50bca8a..ef54c4908f 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -1725,9 +1725,7 @@ function ComposerEmbeds({ - - - + {canRemoveQuote && ( dispatch({type: 'embed_remove_quote'})} diff --git a/src/view/com/composer/ComposerReplyTo.tsx b/src/view/com/composer/ComposerReplyTo.tsx index 462779151f..e534816626 100644 --- a/src/view/com/composer/ComposerReplyTo.tsx +++ b/src/view/com/composer/ComposerReplyTo.tsx @@ -132,7 +132,7 @@ export function ComposerReplyTo({replyTo}: {replyTo: ComposerOptsPostRef}) { )} {showFull && parsedQuoteEmbed && parsedQuoteEmbed.type === 'post' && ( - + )}