From 402313107c1ee81b1282fec2f2aabefe49c1db6b Mon Sep 17 00:00:00 2001 From: plebeius Date: Thu, 8 Jan 2026 17:09:35 +0100 Subject: [PATCH] feat(post): add pending approval label --- src/components/comment-content/comment-content.tsx | 12 +++++++++--- src/views/post/post.module.css | 5 +++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/components/comment-content/comment-content.tsx b/src/components/comment-content/comment-content.tsx index 6129445c..a6d55a07 100644 --- a/src/components/comment-content/comment-content.tsx +++ b/src/components/comment-content/comment-content.tsx @@ -23,7 +23,7 @@ const CommentContent = ({ comment: post }: { comment: Comment }) => { const isMobile = useIsMobile(); // TODO: commentAuthor is not yet available outside of editedComment, wait for API to be updated - const { cid, content, deleted, edit, original, parentCid, postCid, reason, removed, state } = post || {}; + const { cid, content, deleted, edit, original, parentCid, postCid, pendingApproval, reason, removed, state } = post || {}; // const banned = !!post?.commentAuthor?.banExpiresAt; const [showFullComment, setShowFullComment] = useState(false); @@ -32,8 +32,8 @@ const CommentContent = ({ comment: post }: { comment: Comment }) => { (!isInPostView && content.length > 1000 && !showFullComment ? content.slice(0, 1000) : isInPostView && content.length > 2000 && !showFullComment - ? content.slice(0, 2000) - : content); + ? content.slice(0, 2000) + : content); const quotelinkReply = useSubplebbitsPagesStore((state) => state.comments[parentCid]); @@ -70,6 +70,12 @@ const CommentContent = ({ comment: post }: { comment: Comment }) => { ) : ( <> {!showOriginal && } + {pendingApproval && ( + <> +
+ (Pending mod approval, not visible to users) + + )} {((!isInPostView && content?.length > 1000 && !showFullComment) || (isInPostView && content?.length > 2000 && !showFullComment)) && (
diff --git a/src/views/post/post.module.css b/src/views/post/post.module.css index faa4bbf6..27c8c37c 100644 --- a/src/views/post/post.module.css +++ b/src/views/post/post.module.css @@ -517,6 +517,11 @@ color: red; } +.pendingApproval { + color: red; + font-weight: 700; +} + .grayEditMessage { color: var(--post-mobile-abbr-text-color); }