From 9b2228708ae587d9c76727c1a8df7861e9d421ee Mon Sep 17 00:00:00 2001 From: Djordje Vlaisavljevic Date: Thu, 19 Sep 2024 20:28:01 +0100 Subject: [PATCH] Improved feed item layout and typography ref https://linear.app/tryghost/issue/AP-282/render-notes-in-the-frontend --- .../src/components/feed/FeedItem.tsx | 114 ++++++++++-------- 1 file changed, 64 insertions(+), 50 deletions(-) diff --git a/apps/admin-x-activitypub/src/components/feed/FeedItem.tsx b/apps/admin-x-activitypub/src/components/feed/FeedItem.tsx index 7ede2d5ef8..64693af946 100644 --- a/apps/admin-x-activitypub/src/components/feed/FeedItem.tsx +++ b/apps/admin-x-activitypub/src/components/feed/FeedItem.tsx @@ -55,7 +55,7 @@ export function renderFeedAttachment(object: ObjectProperties, layout: string) { } return ( -
+
{attachment.map((item, index) => ( {`attachment-${index}`} ))} @@ -67,10 +67,10 @@ export function renderFeedAttachment(object: ObjectProperties, layout: string) { case 'image/jpeg': case 'image/png': case 'image/gif': - return attachment; + return attachment; case 'video/mp4': case 'video/webm': - return
+ return
; @@ -164,9 +164,9 @@ const FeedItemStats: React.FC<{ }; return (
-
+
-
+
); }; @@ -261,7 +263,7 @@ const FeedItem: React.FC = ({actor, object, layout, type, comment const UserMenuTrigger = (
*/}
-
+
)} @@ -392,13 +400,16 @@ const FeedItem: React.FC = ({actor, object, layout, type, comment {object.name && {object.name}}
{renderFeedAttachment(object, layout)} - +
+ + +
{/* */} @@ -429,13 +440,16 @@ const FeedItem: React.FC = ({actor, object, layout, type, comment {renderInboxAttachment(object)} - +
+ + +