sforkowany z mirror/soapbox
Merge branch 'external-profile-link' into 'develop'
View remote profile from 3-dots Closes #997 See merge request soapbox-pub/soapbox!1896redesign-interaction-bar2
commit
286b483ff1
|
@ -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) {
|
||||
|
|
Ładowanie…
Reference in New Issue