Header: hide message button again (for now)
This commit is contained in:
parent
d0ec2af4ee
commit
632726ef1c
1 changed files with 26 additions and 26 deletions
|
@ -654,33 +654,33 @@ const Header: React.FC<IHeader> = ({ account }) => {
|
|||
return info;
|
||||
};
|
||||
|
||||
const renderMessageButton = () => {
|
||||
if (!ownAccount || !account || account.id === ownAccount?.id) {
|
||||
return null;
|
||||
}
|
||||
// const renderMessageButton = () => {
|
||||
// if (!ownAccount || !account || account.id === ownAccount?.id) {
|
||||
// return null;
|
||||
// }
|
||||
|
||||
const canChat = account.getIn(['pleroma', 'accepts_chat_messages']) === true;
|
||||
// const canChat = account.getIn(['pleroma', 'accepts_chat_messages']) === true;
|
||||
|
||||
if (canChat) {
|
||||
return (
|
||||
<IconButton
|
||||
src={require('@tabler/icons/messages.svg')}
|
||||
onClick={onChat}
|
||||
title={intl.formatMessage(messages.chat, { name: account.username })}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<IconButton
|
||||
src={require('@tabler/icons/mail.svg')}
|
||||
onClick={onDirect}
|
||||
title={intl.formatMessage(messages.direct, { name: account.username })}
|
||||
className='px-2 border border-solid bg-transparent border-gray-400 dark:border-gray-800 hover:border-primary-300 dark:hover:border-primary-700 focus:border-primary-500 text-gray-900 dark:text-gray-100 focus:ring-primary-500'
|
||||
iconClassName='w-4 h-4'
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
// if (canChat) {
|
||||
// return (
|
||||
// <IconButton
|
||||
// src={require('@tabler/icons/messages.svg')}
|
||||
// onClick={onChat}
|
||||
// title={intl.formatMessage(messages.chat, { name: account.username })}
|
||||
// />
|
||||
// );
|
||||
// } else {
|
||||
// return (
|
||||
// <IconButton
|
||||
// src={require('@tabler/icons/mail.svg')}
|
||||
// onClick={onDirect}
|
||||
// title={intl.formatMessage(messages.direct, { name: account.username })}
|
||||
// className='px-2 border border-solid bg-transparent border-gray-400 dark:border-gray-800 hover:border-primary-300 dark:hover:border-primary-700 focus:border-primary-500 text-gray-900 dark:text-gray-100 focus:ring-primary-500'
|
||||
// iconClassName='w-4 h-4'
|
||||
// />
|
||||
// );
|
||||
// }
|
||||
// };
|
||||
|
||||
const renderShareButton = () => {
|
||||
const canShare = 'share' in navigator;
|
||||
|
@ -796,7 +796,7 @@ const Header: React.FC<IHeader> = ({ account }) => {
|
|||
)}
|
||||
|
||||
{renderShareButton()}
|
||||
{renderMessageButton()}
|
||||
{/* {renderMessageButton()} */}
|
||||
|
||||
<ActionButton account={account} />
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue