0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-04 02:01:58 -05:00

Fixed missing author handle in admin-x-activitypub (#22011)

refs
[AP-647](https://linear.app/ghost/issue/AP-648/refactor-profile-tab-to-use-account-and-follows)

Fixed missing author handle in admin-x-activitypub
This commit is contained in:
Michael Barrett 2025-01-15 17:53:38 +00:00 committed by GitHub
parent 6bc164cb7c
commit 4ebf4dd1b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 6 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@tryghost/admin-x-activitypub",
"version": "0.3.45",
"version": "0.3.46",
"license": "MIT",
"repository": {
"type": "git",

View file

@ -204,7 +204,8 @@ const FollowingTab: React.FC = () => {
icon: {
url: account.avatarUrl
},
name: account.name
name: account.name,
handle: account.handle
}} />
<div>
<div className='text-grey-600'>
@ -245,7 +246,8 @@ const FollowersTab: React.FC = () => {
icon: {
url: account.avatarUrl
},
name: account.name
name: account.name,
handle: account.handle
}} />
<div>
<div className='text-grey-600'>
@ -364,7 +366,8 @@ const Profile: React.FC<ProfileProps> = ({}) => {
icon: {
url: account?.avatarUrl
},
name: account?.name
name: account?.name,
handle: account?.handle
}}
size='lg'
/>

View file

@ -14,6 +14,7 @@ interface APAvatarProps {
url: string;
};
name: string;
handle?: string;
} | undefined;
size?: AvatarSize;
}
@ -64,14 +65,16 @@ const APAvatar: React.FC<APAvatarProps> = ({author, size}) => {
containerClass = clsx(containerClass, 'bg-grey-100');
}
const handle = author?.handle || getUsername(author as ActorProperties);
const onClick = (e: React.MouseEvent) => {
e.stopPropagation();
NiceModal.show(ViewProfileModal, {
profile: getUsername(author as ActorProperties)
profile: handle
});
};
const title = `${author?.name} ${getUsername(author as ActorProperties)}`;
const title = `${author?.name} ${handle}`;
if (iconUrl) {
return (