AccountModerationModal: add account preview
This commit is contained in:
parent
1e3a959c1c
commit
d653c451b6
1 changed files with 20 additions and 8 deletions
|
@ -1,8 +1,9 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
|
import Account from 'soapbox/components/account';
|
||||||
import MissingIndicator from 'soapbox/components/missing_indicator';
|
import MissingIndicator from 'soapbox/components/missing_indicator';
|
||||||
import { Button, HStack, Modal } from 'soapbox/components/ui';
|
import { Button, HStack, Modal, Stack } from 'soapbox/components/ui';
|
||||||
import { useAppSelector, useFeatures } from 'soapbox/hooks';
|
import { useAppSelector, useFeatures } from 'soapbox/hooks';
|
||||||
import { makeGetAccount } from 'soapbox/selectors';
|
import { makeGetAccount } from 'soapbox/selectors';
|
||||||
|
|
||||||
|
@ -39,6 +40,16 @@ const AccountModerationModal: React.FC<IAccountModerationModal> = ({ onClose, ac
|
||||||
title={<FormattedMessage id='account_moderation_modal.title' defaultMessage='Moderate @{acct}' values={{ acct: account.acct }} />}
|
title={<FormattedMessage id='account_moderation_modal.title' defaultMessage='Moderate @{acct}' values={{ acct: account.acct }} />}
|
||||||
onClose={handleClose}
|
onClose={handleClose}
|
||||||
>
|
>
|
||||||
|
<Stack space={4}>
|
||||||
|
<div className='p-4 rounded-lg border border-solid border-gray-300 dark:border-gray-800'>
|
||||||
|
<Account
|
||||||
|
account={account}
|
||||||
|
showProfileHoverCard={false}
|
||||||
|
withLinkToProfile={false}
|
||||||
|
hideActions
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
{features.adminFE && (
|
{features.adminFE && (
|
||||||
<HStack justifyContent='center'>
|
<HStack justifyContent='center'>
|
||||||
<Button icon={require('@tabler/icons/external-link.svg')} size='sm' theme='secondary' onClick={handleAdminFE}>
|
<Button icon={require('@tabler/icons/external-link.svg')} size='sm' theme='secondary' onClick={handleAdminFE}>
|
||||||
|
@ -46,6 +57,7 @@ const AccountModerationModal: React.FC<IAccountModerationModal> = ({ onClose, ac
|
||||||
</Button>
|
</Button>
|
||||||
</HStack>
|
</HStack>
|
||||||
)}
|
)}
|
||||||
|
</Stack>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue