Merge branch 'external-profile-link' into 'develop'
View remote profile from 3-dots Closes #997 See merge request soapbox-pub/soapbox!1896
This commit is contained in:
commit
286b483ff1
|
@ -66,6 +66,7 @@ const messages = defineMessages({
|
||||||
removeFromFollowersConfirm: { id: 'confirmations.remove_from_followers.confirm', defaultMessage: 'Remove' },
|
removeFromFollowersConfirm: { id: 'confirmations.remove_from_followers.confirm', defaultMessage: 'Remove' },
|
||||||
userEndorsed: { id: 'account.endorse.success', defaultMessage: 'You are now featuring @{acct} on your profile' },
|
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}' },
|
userUnendorsed: { id: 'account.unendorse.success', defaultMessage: 'You are no longer featuring @{acct}' },
|
||||||
|
profileExternal: { id: 'account.profile_external', defaultMessage: 'View profile on {domain}' },
|
||||||
});
|
});
|
||||||
|
|
||||||
interface IHeader {
|
interface IHeader {
|
||||||
|
@ -173,6 +174,10 @@ const Header: React.FC<IHeader> = ({ account }) => {
|
||||||
dispatch(unblockDomain(domain));
|
dispatch(unblockDomain(domain));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const onProfileExternal = (url: string) => {
|
||||||
|
window.open(url, '_blank');
|
||||||
|
};
|
||||||
|
|
||||||
const onAddToList = () => {
|
const onAddToList = () => {
|
||||||
dispatch(openModal('LIST_ADDER', {
|
dispatch(openModal('LIST_ADDER', {
|
||||||
accountId: account.id,
|
accountId: account.id,
|
||||||
|
@ -421,6 +426,14 @@ const Header: React.FC<IHeader> = ({ account }) => {
|
||||||
icon: require('@tabler/icons/ban.svg'),
|
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) {
|
if (ownAccount?.staff) {
|
||||||
|
|
Loading…
Reference in New Issue