kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
AccountModerationModal: only show staff picker for local accounts
rodzic
cfdace9454
commit
6ecb715a71
|
@ -10,6 +10,7 @@ import { Button, HStack, Modal, Stack } from 'soapbox/components/ui';
|
||||||
import { SelectDropdown } from 'soapbox/features/forms';
|
import { SelectDropdown } from 'soapbox/features/forms';
|
||||||
import { useAppDispatch, useAppSelector, useFeatures } from 'soapbox/hooks';
|
import { useAppDispatch, useAppSelector, useFeatures } from 'soapbox/hooks';
|
||||||
import { makeGetAccount } from 'soapbox/selectors';
|
import { makeGetAccount } from 'soapbox/selectors';
|
||||||
|
import { isLocal } from 'soapbox/utils/accounts';
|
||||||
|
|
||||||
import type { Account as AccountEntity } from 'soapbox/types/entities';
|
import type { Account as AccountEntity } from 'soapbox/types/entities';
|
||||||
|
|
||||||
|
@ -115,15 +116,17 @@ const AccountModerationModal: React.FC<IAccountModerationModal> = ({ onClose, ac
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<List>
|
{isLocal(account) && (
|
||||||
<ListItem label={<FormattedMessage id='account_moderation_modal.fields.account_role' defaultMessage='Staff level' />}>
|
<List>
|
||||||
<SelectDropdown
|
<ListItem label={<FormattedMessage id='account_moderation_modal.fields.account_role' defaultMessage='Staff level' />}>
|
||||||
items={roles}
|
<SelectDropdown
|
||||||
defaultValue={accountRole}
|
items={roles}
|
||||||
onChange={handleRoleChange}
|
defaultValue={accountRole}
|
||||||
/>
|
onChange={handleRoleChange}
|
||||||
</ListItem>
|
/>
|
||||||
</List>
|
</ListItem>
|
||||||
|
</List>
|
||||||
|
)}
|
||||||
|
|
||||||
{features.adminFE && (
|
{features.adminFE && (
|
||||||
<HStack justifyContent='center'>
|
<HStack justifyContent='center'>
|
||||||
|
|
Ładowanie…
Reference in New Issue