kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Hidden blocks button
rodzic
d67b10a376
commit
ec594e7c96
|
@ -558,11 +558,13 @@ const StatusActionBar: React.FC<IStatusActionBar> = ({
|
|||
action: handleMuteClick,
|
||||
icon: require('@tabler/icons/outline/volume-3.svg'),
|
||||
});
|
||||
if (features.blocks) {
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.block, { name: username }),
|
||||
action: handleBlockClick,
|
||||
icon: require('@tabler/icons/outline/ban.svg'),
|
||||
});
|
||||
}
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.report, { name: username }),
|
||||
action: handleReport,
|
||||
|
|
|
@ -371,11 +371,13 @@ const Header: React.FC<IHeader> = ({ account }) => {
|
|||
to: '/mutes',
|
||||
icon: require('@tabler/icons/outline/circle-x.svg'),
|
||||
});
|
||||
if (features.blocks) {
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.blocks),
|
||||
to: '/blocks',
|
||||
icon: require('@tabler/icons/outline/ban.svg'),
|
||||
});
|
||||
}
|
||||
} else {
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.mention, { name: account.username }),
|
||||
|
@ -453,6 +455,7 @@ const Header: React.FC<IHeader> = ({ account }) => {
|
|||
});
|
||||
}
|
||||
|
||||
if (features.blocks) {
|
||||
if (account.relationship?.blocking) {
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.unblock, { name: account.username }),
|
||||
|
@ -466,6 +469,7 @@ const Header: React.FC<IHeader> = ({ account }) => {
|
|||
icon: require('@tabler/icons/outline/ban.svg'),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.report, { name: account.username }),
|
||||
|
|
|
@ -85,7 +85,7 @@ const Settings = () => {
|
|||
<CardBody>
|
||||
<List>
|
||||
<ListItem label={intl.formatMessage(messages.mutes)} to='/mutes' />
|
||||
<ListItem label={intl.formatMessage(messages.blocks)} to='/blocks' />
|
||||
{features.blocks && (<ListItem label={intl.formatMessage(messages.blocks)} to='/blocks' />)}
|
||||
</List>
|
||||
</CardBody>
|
||||
|
||||
|
|
|
@ -23,8 +23,7 @@ const ActionsModal: React.FC<IActionsModal> = ({ status, actions, onClick, onClo
|
|||
const renderAction = (action: MenuItem | null, i: number) => {
|
||||
if (action === null) {
|
||||
return <li key={`sep-${i}`} className='dropdown-menu__separator' />;
|
||||
}
|
||||
|
||||
} else if (action.text !== 'Blocks') {
|
||||
const { icon = null, text, meta = null, active = false, href = '#', destructive } = action;
|
||||
|
||||
const Comp = href === '#' ? 'button' : 'a';
|
||||
|
@ -47,6 +46,7 @@ const ActionsModal: React.FC<IActionsModal> = ({ status, actions, onClick, onClo
|
|||
</HStack>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
Ładowanie…
Reference in New Issue