AccountHeader: remove deactivate/delete options

poast
Alex Gleason 2022-09-11 14:30:24 -05:00
rodzic 5d30a8772d
commit 6d70989ef5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 0 dodań i 19 usunięć

Wyświetl plik

@ -10,7 +10,6 @@ import { launchChat } from 'soapbox/actions/chats';
import { mentionCompose, directCompose } from 'soapbox/actions/compose';
import { blockDomain, unblockDomain } from 'soapbox/actions/domain_blocks';
import { openModal } from 'soapbox/actions/modals';
import { deactivateUserModal } from 'soapbox/actions/moderation';
import { initMuteModal } from 'soapbox/actions/mutes';
import { initReport } from 'soapbox/actions/reports';
import { setSearchAccount } from 'soapbox/actions/search';
@ -57,8 +56,6 @@ const messages = defineMessages({
removeFromFollowers: { id: 'account.remove_from_followers', defaultMessage: 'Remove this follower' },
adminAccount: { id: 'status.admin_account', defaultMessage: 'Moderate @{name}' },
add_or_remove_from_list: { id: 'account.add_or_remove_from_list', defaultMessage: 'Add or Remove from lists' },
deactivateUser: { id: 'admin.users.actions.deactivate_user', defaultMessage: 'Deactivate @{name}' },
deleteUser: { id: 'admin.users.actions.delete_user', defaultMessage: 'Delete @{name}' },
search: { id: 'account.search', defaultMessage: 'Search from @{name}' },
searchSelf: { id: 'account.search_self', defaultMessage: 'Search your posts' },
unfollowConfirm: { id: 'confirmations.unfollow.confirm', defaultMessage: 'Unfollow' },
@ -185,10 +182,6 @@ const Header: React.FC<IHeader> = ({ account }) => {
dispatch(launchChat(account.id, history));
};
const onDeactivateUser = () => {
dispatch(deactivateUserModal(intl, account.id));
};
const onModerate = () => {
dispatch(openModal('ACCOUNT_MODERATION', { accountId: account.id }));
};
@ -445,18 +438,6 @@ const Header: React.FC<IHeader> = ({ account }) => {
icon: require('@tabler/icons/gavel.svg'),
});
}
if (account.id !== ownAccount?.id) {
menu.push({
text: intl.formatMessage(messages.deactivateUser, { name: account.username }),
action: onDeactivateUser,
icon: require('@tabler/icons/user-off.svg'),
});
menu.push({
text: intl.formatMessage(messages.deleteUser, { name: account.username }),
icon: require('@tabler/icons/user-minus.svg'),
});
}
}
return menu;