From c013dcf01baaedb21571cd464530ae3079c87648 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 21 Aug 2022 14:47:23 -0400 Subject: [PATCH] EmbeddedStatus: add SiteLogo --- app/soapbox/components/status.tsx | 8 ++++++-- app/soapbox/features/embedded-status/index.tsx | 9 ++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/soapbox/components/status.tsx b/app/soapbox/components/status.tsx index 7e211b6eb..90f44d496 100644 --- a/app/soapbox/components/status.tsx +++ b/app/soapbox/components/status.tsx @@ -49,6 +49,7 @@ export interface IStatus { hoverable?: boolean, variant?: 'default' | 'rounded', withDismiss?: boolean, + accountAction?: React.ReactElement, } const Status: React.FC = (props) => { @@ -68,6 +69,7 @@ const Status: React.FC = (props) => { variant = 'rounded', withDismiss, } = props; + const intl = useIntl(); const history = useHistory(); const dispatch = useAppDispatch(); @@ -295,6 +297,8 @@ const Status: React.FC = (props) => { const statusUrl = `/@${actualStatus.getIn(['account', 'acct'])}/posts/${actualStatus.id}`; + const accountAction = props.accountAction || reblogElement; + return (
= (props) => { id={String(actualStatus.getIn(['account', 'id']))} timestamp={actualStatus.created_at} timestampUrl={statusUrl} - action={reblogElement} - hideActions={!reblogElement} + action={accountAction} + hideActions={!accountAction} showEdit={!!actualStatus.edited_at} showProfileHoverCard={hoverable} withLinkToProfile={hoverable} diff --git a/app/soapbox/features/embedded-status/index.tsx b/app/soapbox/features/embedded-status/index.tsx index 67e355507..64cafe2cd 100644 --- a/app/soapbox/features/embedded-status/index.tsx +++ b/app/soapbox/features/embedded-status/index.tsx @@ -3,6 +3,7 @@ import { useHistory } from 'react-router-dom'; import { fetchStatus } from 'soapbox/actions/statuses'; import MissingIndicator from 'soapbox/components/missing_indicator'; +import SiteLogo from 'soapbox/components/site-logo'; import Status from 'soapbox/components/status'; import { Spinner } from 'soapbox/components/ui'; import { useAppDispatch, useAppSelector } from 'soapbox/hooks'; @@ -43,11 +44,17 @@ const EmbeddedStatus: React.FC = ({ params }) => { }, '*'); }, [status, loading]); + const logo = ( +
+ +
+ ); + const renderInner = () => { if (loading) { return ; } else if (status) { - return ; + return ; } else { return ; }