= ({ status, hoverable
// The typical case with a reply-to and a list of mentions.
const accounts = to.slice(0, 2).map(account => {
const link = (
-
@{account.username}
+
e.stopPropagation()}>@{account.username}
);
if (hoverable) {
diff --git a/app/soapbox/components/status.tsx b/app/soapbox/components/status.tsx
index 961ca5fbe..f01ded300 100644
--- a/app/soapbox/components/status.tsx
+++ b/app/soapbox/components/status.tsx
@@ -84,6 +84,8 @@ const Status: React.FC
= (props) => {
const actualStatus = getActualStatus(status);
+ const statusUrl = `/@${actualStatus.getIn(['account', 'acct'])}/posts/${actualStatus.id}`;
+
// Track height changes we know about to compensate scrolling.
useEffect(() => {
didShowCard.current = Boolean(!muted && !hidden && status?.card);
@@ -97,11 +99,17 @@ const Status: React.FC = (props) => {
setShowMedia(!showMedia);
};
- const handleClick = (): void => {
- if (onClick) {
- onClick();
+ const handleClick = (e?: React.MouseEvent): void => {
+ e?.stopPropagation();
+
+ if (!e || !(e.ctrlKey || e.metaKey)) {
+ if (onClick) {
+ onClick();
+ } else {
+ history.push(statusUrl);
+ }
} else {
- history.push(`/@${actualStatus.getIn(['account', 'acct'])}/posts/${actualStatus.id}`);
+ window.open(statusUrl, '_blank');
}
};
@@ -145,7 +153,7 @@ const Status: React.FC = (props) => {
};
const handleHotkeyOpen = (): void => {
- history.push(`/@${actualStatus.getIn(['account', 'acct'])}/posts/${actualStatus.id}`);
+ history.push(statusUrl);
};
const handleHotkeyOpenProfile = (): void => {
@@ -292,11 +300,9 @@ const Status: React.FC = (props) => {
react: handleHotkeyReact,
};
- const statusUrl = `/@${actualStatus.getIn(['account', 'acct'])}/posts/${actualStatus.id}`;
-
const accountAction = props.accountAction || reblogElement;
- const inReview = actualStatus.visibility === 'self';
+ const isUnderReview = actualStatus.visibility === 'self';
const isSensitive = actualStatus.hidden;
return (
@@ -307,7 +313,7 @@ const Status: React.FC = (props) => {
data-featured={featured ? 'true' : null}
aria-label={textForScreenReader(intl, actualStatus, rebloggedByText)}
ref={node}
- onClick={() => history.push(statusUrl)}
+ onClick={handleClick}
role='link'
>
{featured && (
@@ -354,11 +360,11 @@ const Status: React.FC = (props) => {
- {(inReview || isSensitive) && (
+ {(isUnderReview || isSensitive) && (
= (props) => {
- {!hideActionBar && (
+ {(!hideActionBar && !isUnderReview) && (
diff --git a/app/soapbox/components/status_content.tsx b/app/soapbox/components/status_content.tsx
index 70ee87a15..b3592c62d 100644
--- a/app/soapbox/components/status_content.tsx
+++ b/app/soapbox/components/status_content.tsx
@@ -147,7 +147,7 @@ const StatusContent: React.FC = ({ status, onClick, collapsable
return;
}
- if (deltaX + deltaY < 5 && e.button === 0 && onClick) {
+ if (deltaX + deltaY < 5 && e.button === 0 && !(e.ctrlKey || e.metaKey) && onClick) {
onClick();
}
diff --git a/app/soapbox/components/translate-button.tsx b/app/soapbox/components/translate-button.tsx
index d39cba1a6..07c778fd2 100644
--- a/app/soapbox/components/translate-button.tsx
+++ b/app/soapbox/components/translate-button.tsx
@@ -19,7 +19,7 @@ const TranslateButton: React.FC = ({ status }) => {
const me = useAppSelector((state) => state.me);
- const renderTranslate = /* translationEnabled && */ me && ['public', 'unlisted'].includes(status.visibility) && status.contentHtml.length > 0 && status.language !== null && intl.locale !== status.language;
+ const renderTranslate = me && ['public', 'unlisted'].includes(status.visibility) && status.contentHtml.length > 0 && status.language !== null && intl.locale !== status.language;
const handleTranslate: React.MouseEventHandler = (e) => {
e.stopPropagation();
diff --git a/app/soapbox/features/status/index.tsx b/app/soapbox/features/status/index.tsx
index dbcc373ee..2d419ca84 100644
--- a/app/soapbox/features/status/index.tsx
+++ b/app/soapbox/features/status/index.tsx
@@ -134,6 +134,7 @@ const Thread: React.FC = (props) => {
const me = useAppSelector(state => state.me);
const status = useAppSelector(state => getStatus(state, { id: props.params.statusId }));
const displayMedia = settings.get('displayMedia') as DisplayMedia;
+ const isUnderReview = status?.visibility === 'self';
const { ancestorsIds, descendantsIds } = useAppSelector(state => {
let ancestorsIds = ImmutableOrderedSet();
@@ -412,7 +413,7 @@ const Thread: React.FC = (props) => {
if (next && status) {
dispatch(fetchNext(status.id, next)).then(({ next }) => {
setNext(next);
- }).catch(() => {});
+ }).catch(() => { });
}
}, 300, { leading: true }), [next, status]);
@@ -475,14 +476,18 @@ const Thread: React.FC = (props) => {
onOpenCompareHistoryModal={handleOpenCompareHistoryModal}
/>
-
-
-
+ {!isUnderReview ? (
+ <>
+
+
+
+ >
+ ) : null}
diff --git a/app/soapbox/features/ui/components/actions_modal.tsx b/app/soapbox/features/ui/components/actions_modal.tsx
index 27faaf909..cc00126f6 100644
--- a/app/soapbox/features/ui/components/actions_modal.tsx
+++ b/app/soapbox/features/ui/components/actions_modal.tsx
@@ -40,7 +40,7 @@ const ActionsModal: React.FC