From f769564edfea3ec6406c49ef639685d942e14e09 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Mon, 24 Jun 2024 10:11:43 -0700 Subject: Remove the 'Who can reply' element except when viewing root, and add "edit" (#4615) * Remove the 'Who can reply' element except when viewing root, and add the edit text to authors * Switch to icon --- src/view/com/post-thread/PostThreadItem.tsx | 305 ++++++++++++++-------------- 1 file changed, 150 insertions(+), 155 deletions(-) (limited to 'src/view/com/post-thread/PostThreadItem.tsx') diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 92b529db7..46c6c958e 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -34,8 +34,8 @@ import {ContentHider} from '../../../components/moderation/ContentHider' import {LabelsOnMyPost} from '../../../components/moderation/LabelsOnMe' import {PostAlerts} from '../../../components/moderation/PostAlerts' import {PostHider} from '../../../components/moderation/PostHider' +import {WhoCanReply} from '../../../components/WhoCanReply' import {getTranslatorLink, isPostInLanguage} from '../../../locale/helpers' -import {WhoCanReplyBlock, WhoCanReplyInline} from '../threadgate/WhoCanReply' import {ErrorMessage} from '../util/error/ErrorMessage' import {Link, TextLink} from '../util/Link' import {formatCount} from '../util/numeric/format' @@ -406,177 +406,172 @@ let PostThreadItemLoaded = ({ const isThreadedChildAdjacentBot = isThreadedChild && nextPost?.ctx.depth === depth return ( - <> - - - - - {!isThreadedChild && showParentReplyLine && ( + + + + + {!isThreadedChild && showParentReplyLine && ( + + )} + + + + + {/* If we are in threaded mode, the avatar is rendered in PostMeta */} + {!isThreadedChild && ( + + + + {showChildReplyLine && ( )} - + )} - {/* If we are in threaded mode, the avatar is rendered in PostMeta */} - {!isThreadedChild && ( - - - - {showChildReplyLine && ( - - )} - - )} - - + - - - - {richText?.text ? ( - - - - ) : undefined} - {limitLines ? ( - + + + {richText?.text ? ( + + - ) : undefined} - {post.embed && ( - - - - )} - + ) : undefined} + {limitLines ? ( + - + ) : undefined} + {post.embed && ( + + + + )} + - {hasMore ? ( - - - More - - - - ) : undefined} - - - - + + {hasMore ? ( + + + More + + + + ) : undefined} + + ) } } @@ -671,7 +666,7 @@ function ExpandedPostDetails({ s.mb10, ]}> {niceDate(post.indexedAt)} - + {needsTranslation && ( <> · -- cgit 1.4.1