diff --git a/app/soapbox/features/edit_profile/index.tsx b/app/soapbox/features/edit_profile/index.tsx index 647bb98e3..f3254dbc4 100644 --- a/app/soapbox/features/edit_profile/index.tsx +++ b/app/soapbox/features/edit_profile/index.tsx @@ -1,19 +1,16 @@ import React, { useState, useEffect, useMemo } from 'react'; import { defineMessages, useIntl, FormattedMessage } from 'react-intl'; +import Toggle from 'react-toggle'; import { updateNotificationSettings } from 'soapbox/actions/accounts'; import { patchMe } from 'soapbox/actions/me'; import snackbar from 'soapbox/actions/snackbar'; -import { - Checkbox, -} from 'soapbox/features/forms'; +import List, { ListItem } from 'soapbox/components/list'; import { useAppSelector, useAppDispatch, useOwnAccount, useFeatures } from 'soapbox/hooks'; import { normalizeAccount } from 'soapbox/normalizers'; import resizeImage from 'soapbox/utils/resize_image'; -import { Button, Column, Form, FormActions, FormGroup, Input, Textarea } from '../../components/ui'; -import HStack from '../../components/ui/hstack/hstack'; -import Stack from '../../components/ui/stack/stack'; +import { Button, Column, Form, FormActions, FormGroup, Input, Textarea, HStack } from '../../components/ui'; import Streamfield, { StreamfieldComponent } from '../../components/ui/streamfield/streamfield'; import ProfilePreview from './components/profile-preview'; @@ -396,61 +393,79 @@ const EditProfile: React.FC = () => { {/* HACK: wrap these checkboxes in a .simple_form container so they get styled (for now) */} {/* Need a either move, replace, or refactor these checkboxes. */} - + {features.followRequests && ( - } hint={} - checked={data.locked} - onChange={handleCheckboxChange('locked')} - /> + > + + )} {features.hideNetwork && ( - } hint={} - checked={account ? hidesNetwork(account): false} - onChange={handleHideNetworkChange} - /> + > + + )} {features.bots && ( - } hint={} - checked={data.bot} - onChange={handleCheckboxChange('bot')} - /> + > + + )} {features.muteStrangers && ( - } hint={} - checked={muteStrangers} - onChange={(e) => setMuteStrangers(e.target.checked)} - /> + > + setMuteStrangers(e.target.checked)} + /> + )} {features.profileDirectory && ( - } hint={} - checked={data.discoverable} - onChange={handleCheckboxChange('discoverable')} - /> + > + + )} {features.emailList && ( - } hint={} - checked={data.accepts_email_list} - onChange={handleCheckboxChange('accepts_email_list')} - /> + > + + )} - + {features.profileFields && (