mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-05 17:31:12 +00:00
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:
parent
591df1f205
commit
8dc2329b47
|
@ -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'>
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user