diff --git a/apps/admin-x-activitypub/src/components/Activities.tsx b/apps/admin-x-activitypub/src/components/Activities.tsx index 403a3309da..4a155ce104 100644 --- a/apps/admin-x-activitypub/src/components/Activities.tsx +++ b/apps/admin-x-activitypub/src/components/Activities.tsx @@ -3,7 +3,7 @@ import React from 'react'; import APAvatar, {AvatarBadge} from './global/APAvatar'; import ActivityItem from './activities/ActivityItem'; import MainNavigation from './navigation/MainNavigation'; -import {Button} from '@tryghost/admin-x-design-system'; +import {Button, NoValueLabel} from '@tryghost/admin-x-design-system'; import getUsername from '../utils/get-username'; import {useBrowseInboxForUser, useBrowseOutboxForUser, useFollowersForUser} from '../MainContent'; @@ -65,7 +65,7 @@ const getExtendedDescription = (activity: Activity): JSX.Element | null => { return (
); } @@ -92,7 +92,7 @@ const getActorUrl = (activity: Activity): string | null => { const getActivityBadge = (activity: Activity): AvatarBadge => { switch (activity.type) { case ACTVITY_TYPE.CREATE: - return 'user-fill'; // TODO: Change this + return 'comment-fill'; case ACTVITY_TYPE.FOLLOW: return 'user-fill'; case ACTVITY_TYPE.LIKE: @@ -171,19 +171,23 @@ const Activities: React.FC = ({}) => {
{activities.length === 0 && ( -
This is an empty state when there are no activities
+
+ + When other Fediverse users interact with you, you'll see it here. + +
)} {activities.length > 0 && (
{activities?.map(activity => ( -
+
{activity.actor.name} {getUsername(activity.actor)}
-
{getActivityDescription(activity, activityObjectsMap)}
+
{getActivityDescription(activity, activityObjectsMap)}
{getExtendedDescription(activity)}
{isFollower(activity.actor.id) === false && ( diff --git a/apps/admin-x-activitypub/src/components/Profile.tsx b/apps/admin-x-activitypub/src/components/Profile.tsx index ac6c5b26bb..8cc424b7c6 100644 --- a/apps/admin-x-activitypub/src/components/Profile.tsx +++ b/apps/admin-x-activitypub/src/components/Profile.tsx @@ -35,7 +35,7 @@ const Profile: React.FC = ({}) => { id: 'likes', title: 'Likes', contents: ( -
+
{liked.length === 0 ? ( You haven't liked anything yet. @@ -141,10 +141,10 @@ const Profile: React.FC = ({}) => {
- John Doe - @index@site.com -

This is a summary/bio/etc which could be kinda long in certain cases but not always, so...

- www.coolsite.com + Building ActivityPub + @index@activitypub.ghost.org +

Ghost is federating over ActivityPub to become part of the world's largest publishing network

+ activitypub.ghost.org containerClassName='mt-6' selectedTab={selectedTab} tabs={tabs} onTabChange={setSelectedTab} />
diff --git a/apps/admin-x-activitypub/src/components/activities/ActivityItem.tsx b/apps/admin-x-activitypub/src/components/activities/ActivityItem.tsx index d5c6dc0823..3156902c7b 100644 --- a/apps/admin-x-activitypub/src/components/activities/ActivityItem.tsx +++ b/apps/admin-x-activitypub/src/components/activities/ActivityItem.tsx @@ -20,7 +20,7 @@ const ActivityItem: React.FC = ({children, url = null}) => { const Item = (
-
+
{childrenArray[0]} {childrenArray[1]} {childrenArray[2]} diff --git a/apps/admin-x-activitypub/src/components/feed/ArticleModal.tsx b/apps/admin-x-activitypub/src/components/feed/ArticleModal.tsx index c7e7dab5c5..15cabbaec5 100644 --- a/apps/admin-x-activitypub/src/components/feed/ArticleModal.tsx +++ b/apps/admin-x-activitypub/src/components/feed/ArticleModal.tsx @@ -70,7 +70,7 @@ ${image && }; const FeedItemDivider: React.FC = () => ( -
+
); const ArticleModal: React.FC = ({object, actor, comments, allComments}) => { diff --git a/apps/admin-x-activitypub/src/components/feed/FeedItem.tsx b/apps/admin-x-activitypub/src/components/feed/FeedItem.tsx index 1dc0dcbc93..e0e3aa5041 100644 --- a/apps/admin-x-activitypub/src/components/feed/FeedItem.tsx +++ b/apps/admin-x-activitypub/src/components/feed/FeedItem.tsx @@ -89,10 +89,10 @@ function renderInboxAttachment(object: ObjectProperties) { // } return (
-
+ {attachment[0] &&
+ {attachmentCount - 1}
-
+
}
); } @@ -103,7 +103,7 @@ function renderInboxAttachment(object: ObjectProperties) { case 'image/gif': return (
- + {attachment && }
); case 'video/mp4': @@ -302,7 +302,7 @@ const FeedItem: React.FC = ({actor, object, layout, type, comment
-
+
)} @@ -312,12 +312,12 @@ const FeedItem: React.FC = ({actor, object, layout, type, comment return ( <> {object && ( -
+
{(type === 'Announce' && object.type === 'Note') &&
{actor.name} reposted
} -
+
diff --git a/apps/admin-x-activitypub/src/components/global/APAvatar.tsx b/apps/admin-x-activitypub/src/components/global/APAvatar.tsx index 09211ccb25..b8a551c87d 100644 --- a/apps/admin-x-activitypub/src/components/global/APAvatar.tsx +++ b/apps/admin-x-activitypub/src/components/global/APAvatar.tsx @@ -3,7 +3,7 @@ import {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub'; import {Icon} from '@tryghost/admin-x-design-system'; type AvatarSize = 'xs' | 'sm' | 'lg'; -export type AvatarBadge = 'user-fill' | 'heart-fill' | undefined; +export type AvatarBadge = 'user-fill' | 'heart-fill' | 'comment-fill' | undefined; interface APAvatarProps { author?: ActorProperties; @@ -25,6 +25,9 @@ const APAvatar: React.FC = ({author, size, badge}) => { case 'heart-fill': badgeColor = ' bg-red-500'; break; + case 'comment-fill': + badgeColor = ' bg-purple-500'; + break; } switch (size) { @@ -47,7 +50,7 @@ const APAvatar: React.FC = ({author, size, badge}) => { return ( <> {author && author.icon?.url ? ( - + + + + \ No newline at end of file diff --git a/ghost/admin/app/components/gh-nav-menu/main.hbs b/ghost/admin/app/components/gh-nav-menu/main.hbs index 14845bd387..239c7ca41a 100644 --- a/ghost/admin/app/components/gh-nav-menu/main.hbs +++ b/ghost/admin/app/components/gh-nav-menu/main.hbs @@ -17,6 +17,11 @@ {{#unless this.session.user.isContributor}}
    + {{#if (feature "ActivityPub")}} +
  • + {{svg-jar "star"}}ActivityPub +
  • + {{/if}} {{#if (gh-user-can-admin this.session.user)}}
  • {{svg-jar "house"}} Dashboard @@ -128,11 +133,6 @@ {{svg-jar "star"}}AdminX Demo
  • {{/if}} - {{#if (feature "ActivityPub")}} -
  • - {{svg-jar "star"}}ActivityPub Demo -
  • - {{/if}}
{{#if this.session.user.isOwnerOnly}}