Add 'local' to account schema
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
@ -12,7 +12,6 @@ import OutlineBox from 'soapbox/components/outline-box';
|
||||
import { Button, Text, HStack, Modal, Stack, Toggle } from 'soapbox/components/ui';
|
||||
import { useAppDispatch, useFeatures, useOwnAccount } from 'soapbox/hooks';
|
||||
import toast from 'soapbox/toast';
|
||||
import { isLocal } from 'soapbox/utils/accounts';
|
||||
import { getBadges } from 'soapbox/utils/badges';
|
||||
|
||||
import BadgeInput from './badge-input';
|
||||
@ -115,7 +114,7 @@ const AccountModerationModal: React.FC<IAccountModerationModal> = ({ onClose, ac
|
||||
</OutlineBox>
|
||||
|
||||
<List>
|
||||
{(ownAccount.admin && isLocal(account)) && (
|
||||
{(ownAccount.admin && account.local) && (
|
||||
<ListItem label={<FormattedMessage id='account_moderation_modal.fields.account_role' defaultMessage='Staff level' />}>
|
||||
<div className='w-auto'>
|
||||
<StaffRolePicker account={account} />
|
||||
|
||||
@ -7,7 +7,7 @@ import { fetchRules } from 'soapbox/actions/rules';
|
||||
import { Button, FormGroup, HStack, Stack, Text, Toggle } from 'soapbox/components/ui';
|
||||
import StatusCheckBox from 'soapbox/features/report/components/status-check-box';
|
||||
import { useAppDispatch, useAppSelector, useFeatures } from 'soapbox/hooks';
|
||||
import { isRemote, getDomain } from 'soapbox/utils/accounts';
|
||||
import { getDomain } from 'soapbox/utils/accounts';
|
||||
|
||||
import type { Account } from 'soapbox/schemas';
|
||||
|
||||
@ -31,7 +31,7 @@ const OtherActionsStep = ({ account }: IOtherActionsStep) => {
|
||||
const statusIds = useAppSelector((state) => OrderedSet(state.timelines.get(`account:${account.id}:with_replies`)!.items).union(state.reports.new.status_ids) as OrderedSet<string>);
|
||||
const isBlocked = useAppSelector((state) => state.reports.new.block);
|
||||
const isForward = useAppSelector((state) => state.reports.new.forward);
|
||||
const canForward = isRemote(account) && features.federating;
|
||||
const canForward = !account.local && features.federating;
|
||||
const isSubmitting = useAppSelector((state) => state.reports.new.isSubmitting);
|
||||
|
||||
const [showAdditionalStatuses, setShowAdditionalStatuses] = useState<boolean>(false);
|
||||
|
||||
@ -7,7 +7,6 @@ import Markup from 'soapbox/components/markup';
|
||||
import { dateFormatOptions } from 'soapbox/components/relative-timestamp';
|
||||
import { Icon, HStack, Stack, Text } from 'soapbox/components/ui';
|
||||
import { useAppSelector, useSoapboxConfig } from 'soapbox/hooks';
|
||||
import { isLocal } from 'soapbox/utils/accounts';
|
||||
import { badgeToTag, getBadges as getAccountBadges } from 'soapbox/utils/badges';
|
||||
import { capitalize } from 'soapbox/utils/strings';
|
||||
|
||||
@ -176,7 +175,7 @@ const ProfileInfoPanel: React.FC<IProfileInfoPanel> = ({ account, username }) =>
|
||||
)}
|
||||
|
||||
<div className='flex flex-col items-start gap-2 md:flex-row md:flex-wrap md:items-center'>
|
||||
{isLocal(account) ? (
|
||||
{account.local ? (
|
||||
<HStack alignItems='center' space={0.5}>
|
||||
<Icon
|
||||
src={require('@tabler/icons/calendar.svg')}
|
||||
|
||||
Reference in New Issue
Block a user