Merge branch 'update-banned-members' into 'develop'
Update banned members design See merge request soapbox-pub/soapbox!2397
This commit is contained in:
commit
b5a657172a
2 changed files with 13 additions and 13 deletions
|
@ -15,9 +15,9 @@ import ColumnForbidden from '../ui/components/column-forbidden';
|
|||
type RouteParams = { id: string };
|
||||
|
||||
const messages = defineMessages({
|
||||
heading: { id: 'column.group_blocked_members', defaultMessage: 'Blocked members' },
|
||||
unblock: { id: 'group.group_mod_unblock', defaultMessage: 'Unblock' },
|
||||
unblocked: { id: 'group.group_mod_unblock.success', defaultMessage: 'Unblocked @{name} from group' },
|
||||
heading: { id: 'column.group_blocked_members', defaultMessage: 'Banned Members' },
|
||||
unblock: { id: 'group.group_mod_unblock', defaultMessage: 'Unban' },
|
||||
unblocked: { id: 'group.group_mod_unblock.success', defaultMessage: 'Unbanned @{name} from group' },
|
||||
});
|
||||
|
||||
interface IBlockedMember {
|
||||
|
@ -36,18 +36,17 @@ const BlockedMember: React.FC<IBlockedMember> = ({ accountId, groupId }) => {
|
|||
if (!account) return null;
|
||||
|
||||
const handleUnblock = () =>
|
||||
dispatch(groupUnblock(groupId, accountId)).then(() => {
|
||||
toast.success(intl.formatMessage(messages.unblocked, { name: account.acct }));
|
||||
});
|
||||
dispatch(groupUnblock(groupId, accountId))
|
||||
.then(() => toast.success(intl.formatMessage(messages.unblocked, { name: account.acct })));
|
||||
|
||||
return (
|
||||
<HStack space={1} alignItems='center' justifyContent='between' className='p-2.5'>
|
||||
<div className='w-full'>
|
||||
<Account account={account} withRelationship={false} />
|
||||
</div>
|
||||
|
||||
<Button
|
||||
theme='danger'
|
||||
size='sm'
|
||||
theme='secondary'
|
||||
text={intl.formatMessage(messages.unblock)}
|
||||
onClick={handleUnblock}
|
||||
/>
|
||||
|
@ -84,13 +83,14 @@ const GroupBlockedMembers: React.FC<IGroupBlockedMembers> = ({ params }) => {
|
|||
return (<ColumnForbidden />);
|
||||
}
|
||||
|
||||
const emptyMessage = <FormattedMessage id='empty_column.group_blocks' defaultMessage="The group hasn't blocked any users yet." />;
|
||||
const emptyMessage = <FormattedMessage id='empty_column.group_blocks' defaultMessage="The group hasn't banned any users yet." />;
|
||||
|
||||
return (
|
||||
<Column label={intl.formatMessage(messages.heading)} backHref={`/groups/${id}/manage`}>
|
||||
<ScrollableList
|
||||
scrollKey='group_blocks'
|
||||
emptyMessage={emptyMessage}
|
||||
emptyMessageCard={false}
|
||||
>
|
||||
{accountIds.map((accountId) =>
|
||||
<BlockedMember key={accountId} accountId={accountId} groupId={id} />,
|
||||
|
|
|
@ -351,7 +351,7 @@
|
|||
"column.follow_requests": "Follow requests",
|
||||
"column.followers": "Followers",
|
||||
"column.following": "Following",
|
||||
"column.group_blocked_members": "Blocked members",
|
||||
"column.group_blocked_members": "Banned Members",
|
||||
"column.group_pending_requests": "Pending requests",
|
||||
"column.groups": "Groups",
|
||||
"column.home": "Home",
|
||||
|
@ -673,7 +673,7 @@
|
|||
"empty_column.follow_recommendations": "Looks like no suggestions could be generated for you. You can try using search to look for people you might know or explore trending hashtags.",
|
||||
"empty_column.follow_requests": "You don't have any follow requests yet. When you receive one, it will show up here.",
|
||||
"empty_column.group": "There are no posts in this group yet.",
|
||||
"empty_column.group_blocks": "The group hasn't blocked any users yet.",
|
||||
"empty_column.group_blocks": "The group hasn't banned any users yet.",
|
||||
"empty_column.group_membership_requests": "There are no pending membership requests for this group.",
|
||||
"empty_column.hashtag": "There is nothing in this hashtag yet.",
|
||||
"empty_column.home": "Or you can visit {public} to get started and meet other users.",
|
||||
|
@ -778,8 +778,8 @@
|
|||
"group.group_mod_kick.success": "Kicked @{name} from group",
|
||||
"group.group_mod_promote_mod": "Assign {role} role",
|
||||
"group.group_mod_reject.fail": "Failed to reject @{name}",
|
||||
"group.group_mod_unblock": "Unblock",
|
||||
"group.group_mod_unblock.success": "Unblocked @{name} from group",
|
||||
"group.group_mod_unblock": "Unban",
|
||||
"group.group_mod_unblock.success": "Unbanned @{name} from group",
|
||||
"group.header.alt": "Group header",
|
||||
"group.join.private": "Request Access",
|
||||
"group.join.public": "Join Group",
|
||||
|
|
Loading…
Reference in a new issue