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:
parent
6bc164cb7c
commit
4ebf4dd1b0
3 changed files with 12 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@tryghost/admin-x-activitypub",
|
||||
"version": "0.3.45",
|
||||
"version": "0.3.46",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -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'
|
||||
/>
|
||||
|
|
|
@ -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 (
|
||||
|
|
Loading…
Add table
Reference in a new issue