diff --git a/packages/pl-fe/src/components/account-hover-card.tsx b/packages/pl-fe/src/components/account-hover-card.tsx index b1d9b29b9..84e9d0526 100644 --- a/packages/pl-fe/src/components/account-hover-card.tsx +++ b/packages/pl-fe/src/components/account-hover-card.tsx @@ -27,6 +27,10 @@ import Scrobble from './scrobble'; import type { Account } from 'pl-fe/normalizers/account'; +const messages = { + pronouns: { id: 'account.pronouns.with_label', defaultMessage: 'Pronouns: {pronouns}' }, +}; + const getBadges = ( account?: Pick, ): JSX.Element[] => { @@ -154,6 +158,22 @@ const AccountHoverCard: React.FC = ({ visible = true }) => { ) : null} + {account.pronouns.length > 0 && ( + + + + + {account.pronouns.join('/')} + + + )} + {!!scrobble && } {account.note.length > 0 && ( diff --git a/packages/pl-fe/src/features/ui/components/panels/profile-info-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/profile-info-panel.tsx index 86c3c643d..698f893e4 100644 --- a/packages/pl-fe/src/features/ui/components/panels/profile-info-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/profile-info-panel.tsx @@ -28,6 +28,7 @@ const messages = defineMessages({ account_locked: { id: 'account.locked_info', defaultMessage: 'This account privacy status is set to locked. The owner manually reviews who can follow them.' }, deactivated: { id: 'account.deactivated', defaultMessage: 'Deactivated' }, bot: { id: 'account.badges.bot', defaultMessage: 'Bot' }, + pronouns: { id: 'account.pronouns.with_label', defaultMessage: 'Pronouns: {pronouns}' }, }); interface IProfileInfoPanel { @@ -129,6 +130,8 @@ const ProfileInfoPanel: React.FC = ({ account, username }) => const memberSinceDate = intl.formatDate(account.created_at, { month: 'long', year: 'numeric' }); const badges = getBadges(); + account.pronouns = ['she', 'her']; + return (
@@ -204,6 +207,22 @@ const ProfileInfoPanel: React.FC = ({ account, username }) => ) : null} {renderBirthday()} + + {account.pronouns.length > 0 ? ( + + + + + {account.pronouns.join('/')} + + + ) : null}
{scrobble && } diff --git a/packages/pl-fe/src/locales/en.json b/packages/pl-fe/src/locales/en.json index e50e81953..af55de495 100644 --- a/packages/pl-fe/src/locales/en.json +++ b/packages/pl-fe/src/locales/en.json @@ -54,6 +54,7 @@ "account.posts_with_replies": "Posts & replies", "account.profile": "Profile", "account.profile_external": "View profile on {domain}", + "account.pronouns.with_label": "Pronouns: {pronouns}", "account.register": "Sign up", "account.remote_follow": "Remote follow", "account.remove_from_followers": "Remove this follower",