fix: show moved account notice in hover card popup

- Add conditional logic to display moved account notice when account.moved is present
- Include link to new account with proper formatting
- Hide follow/unfollow buttons for moved accounts to prevent confusion
- Add localization key 'account.moved_to_short' for hover card context
- Style moved notice to match existing hover card design patterns

Fixes #35623
This commit is contained in:
Quaylyn Rimer 2025-08-03 00:12:48 -06:00
parent 591df1f205
commit 8dc2329b47
3 changed files with 32 additions and 0 deletions

View File

@ -98,6 +98,20 @@ export const HoverCardAccount = forwardRef<
/>
)}
</div>
) : account.moved ? (
<div className='hover-card__moved-notice'>
<FormattedMessage
id='account.moved_to_short'
defaultMessage='This account has moved to {acct}'
values={{
acct: (
<Link to={`/@${account.moved.acct}`}>
<strong>@{account.moved.acct}</strong>
</Link>
),
}}
/>
</div>
) : (
<>
<div className='hover-card__text-row'>

View File

@ -58,6 +58,7 @@
"account.media": "Media",
"account.mention": "Mention @{name}",
"account.moved_to": "{name} has indicated that their new account is now:",
"account.moved_to_short": "This account has moved to {acct}",
"account.mute": "Mute @{name}",
"account.mute_notifications_short": "Mute notifications",
"account.mute_short": "Mute",

View File

@ -11027,6 +11027,23 @@ noscript {
font-weight: 500;
}
&__moved-notice {
text-align: center;
font-weight: 500;
color: $secondary-text-color;
a {
color: inherit;
text-decoration: underline;
&:hover,
&:focus,
&:active {
text-decoration: none;
}
}
}
.display-name {
font-size: 15px;
line-height: 22px;