Update banned members design
This commit is contained in:
parent
f3251d146e
commit
485213972e
2 changed files with 13 additions and 13 deletions
|
@ -15,9 +15,9 @@ import ColumnForbidden from '../ui/components/column-forbidden';
|
||||||
type RouteParams = { id: string };
|
type RouteParams = { id: string };
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
heading: { id: 'column.group_blocked_members', defaultMessage: 'Blocked members' },
|
heading: { id: 'column.group_blocked_members', defaultMessage: 'Banned Members' },
|
||||||
unblock: { id: 'group.group_mod_unblock', defaultMessage: 'Unblock' },
|
unblock: { id: 'group.group_mod_unblock', defaultMessage: 'Unban' },
|
||||||
unblocked: { id: 'group.group_mod_unblock.success', defaultMessage: 'Unblocked @{name} from group' },
|
unblocked: { id: 'group.group_mod_unblock.success', defaultMessage: 'Unbanned @{name} from group' },
|
||||||
});
|
});
|
||||||
|
|
||||||
interface IBlockedMember {
|
interface IBlockedMember {
|
||||||
|
@ -36,18 +36,17 @@ const BlockedMember: React.FC<IBlockedMember> = ({ accountId, groupId }) => {
|
||||||
if (!account) return null;
|
if (!account) return null;
|
||||||
|
|
||||||
const handleUnblock = () =>
|
const handleUnblock = () =>
|
||||||
dispatch(groupUnblock(groupId, accountId)).then(() => {
|
dispatch(groupUnblock(groupId, accountId))
|
||||||
toast.success(intl.formatMessage(messages.unblocked, { name: account.acct }));
|
.then(() => toast.success(intl.formatMessage(messages.unblocked, { name: account.acct })));
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<HStack space={1} alignItems='center' justifyContent='between' className='p-2.5'>
|
<HStack space={1} alignItems='center' justifyContent='between' className='p-2.5'>
|
||||||
<div className='w-full'>
|
<div className='w-full'>
|
||||||
<Account account={account} withRelationship={false} />
|
<Account account={account} withRelationship={false} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
theme='danger'
|
theme='secondary'
|
||||||
size='sm'
|
|
||||||
text={intl.formatMessage(messages.unblock)}
|
text={intl.formatMessage(messages.unblock)}
|
||||||
onClick={handleUnblock}
|
onClick={handleUnblock}
|
||||||
/>
|
/>
|
||||||
|
@ -84,13 +83,14 @@ const GroupBlockedMembers: React.FC<IGroupBlockedMembers> = ({ params }) => {
|
||||||
return (<ColumnForbidden />);
|
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 (
|
return (
|
||||||
<Column label={intl.formatMessage(messages.heading)} backHref={`/groups/${id}/manage`}>
|
<Column label={intl.formatMessage(messages.heading)} backHref={`/groups/${id}/manage`}>
|
||||||
<ScrollableList
|
<ScrollableList
|
||||||
scrollKey='group_blocks'
|
scrollKey='group_blocks'
|
||||||
emptyMessage={emptyMessage}
|
emptyMessage={emptyMessage}
|
||||||
|
emptyMessageCard={false}
|
||||||
>
|
>
|
||||||
{accountIds.map((accountId) =>
|
{accountIds.map((accountId) =>
|
||||||
<BlockedMember key={accountId} accountId={accountId} groupId={id} />,
|
<BlockedMember key={accountId} accountId={accountId} groupId={id} />,
|
||||||
|
|
|
@ -351,7 +351,7 @@
|
||||||
"column.follow_requests": "Follow requests",
|
"column.follow_requests": "Follow requests",
|
||||||
"column.followers": "Followers",
|
"column.followers": "Followers",
|
||||||
"column.following": "Following",
|
"column.following": "Following",
|
||||||
"column.group_blocked_members": "Blocked members",
|
"column.group_blocked_members": "Banned Members",
|
||||||
"column.group_pending_requests": "Pending requests",
|
"column.group_pending_requests": "Pending requests",
|
||||||
"column.groups": "Groups",
|
"column.groups": "Groups",
|
||||||
"column.home": "Home",
|
"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_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.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": "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.group_membership_requests": "There are no pending membership requests for this group.",
|
||||||
"empty_column.hashtag": "There is nothing in this hashtag yet.",
|
"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.",
|
"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_kick.success": "Kicked @{name} from group",
|
||||||
"group.group_mod_promote_mod": "Assign {role} role",
|
"group.group_mod_promote_mod": "Assign {role} role",
|
||||||
"group.group_mod_reject.fail": "Failed to reject @{name}",
|
"group.group_mod_reject.fail": "Failed to reject @{name}",
|
||||||
"group.group_mod_unblock": "Unblock",
|
"group.group_mod_unblock": "Unban",
|
||||||
"group.group_mod_unblock.success": "Unblocked @{name} from group",
|
"group.group_mod_unblock.success": "Unbanned @{name} from group",
|
||||||
"group.header.alt": "Group header",
|
"group.header.alt": "Group header",
|
||||||
"group.join.private": "Request Access",
|
"group.join.private": "Request Access",
|
||||||
"group.join.public": "Join Group",
|
"group.join.public": "Join Group",
|
||||||
|
|
Loading…
Reference in a new issue