View remote profile from 3-dots

environments/review-external-p-3o4iq4/deployments/1397
Alex Gleason 2 years ago
parent b5393b531b
commit ba319c3dd2
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

@ -66,6 +66,7 @@ const messages = defineMessages({
removeFromFollowersConfirm: { id: 'confirmations.remove_from_followers.confirm', defaultMessage: 'Remove' },
userEndorsed: { id: 'account.endorse.success', defaultMessage: 'You are now featuring @{acct} on your profile' },
userUnendorsed: { id: 'account.unendorse.success', defaultMessage: 'You are no longer featuring @{acct}' },
profileExternal: { id: 'account.profile_external', defaultMessage: 'View profile on {domain}' },
});
interface IHeader {
@ -173,6 +174,10 @@ const Header: React.FC<IHeader> = ({ account }) => {
dispatch(unblockDomain(domain));
};
const onProfileExternal = (url: string) => {
window.open(url, '_blank');
};
const onAddToList = () => {
dispatch(openModal('LIST_ADDER', {
accountId: account.id,
@ -421,6 +426,14 @@ const Header: React.FC<IHeader> = ({ account }) => {
icon: require('@tabler/icons/ban.svg'),
});
}
if (features.federating) {
menu.push({
text: intl.formatMessage(messages.profileExternal, { domain }),
action: () => onProfileExternal(account.url),
icon: require('@tabler/icons/external-link.svg'),
});
}
}
if (ownAccount?.staff) {

Loading…
Cancel
Save