mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
Merge pull request #4588 from urbit/james/grab-bag
interface: small grab-bag
This commit is contained in:
commit
201933ecc4
@ -85,7 +85,7 @@ export function ProfileHeaderImageEdit(props: any): ReactElement {
|
||||
|
||||
export function EditProfile(props: any): ReactElement {
|
||||
const { contact, ship, api } = props;
|
||||
const isPublic = useContactState(state => state.isContactPublic);
|
||||
const isPublic = useContactState((state) => state.isContactPublic);
|
||||
const [hideCover, setHideCover] = useState(false);
|
||||
|
||||
const handleHideCover = (value) => {
|
||||
@ -150,7 +150,7 @@ export function EditProfile(props: any): ReactElement {
|
||||
<Form width='100%' height='100%'>
|
||||
<ProfileHeader>
|
||||
<ProfileControls>
|
||||
<Row>
|
||||
<Row alignItems='baseline'>
|
||||
<Button
|
||||
type='submit'
|
||||
display='inline'
|
||||
@ -178,7 +178,11 @@ export function EditProfile(props: any): ReactElement {
|
||||
</Row>
|
||||
<ProfileStatus contact={contact} />
|
||||
</ProfileControls>
|
||||
<ProfileImages hideCover={hideCover} contact={contact} ship={ship}>
|
||||
<ProfileImages
|
||||
hideCover={hideCover}
|
||||
contact={contact}
|
||||
ship={ship}
|
||||
>
|
||||
<ProfileHeaderImageEdit
|
||||
contact={contact}
|
||||
setFieldValue={setFieldValue}
|
||||
@ -203,11 +207,7 @@ export function EditProfile(props: any): ReactElement {
|
||||
<MarkdownField id='bio' mb={3} />
|
||||
</Col>
|
||||
<Checkbox mb={3} id='isPublic' label='Public Profile' />
|
||||
<GroupSearch
|
||||
label='Pinned Groups'
|
||||
id='groups'
|
||||
publicOnly
|
||||
/>
|
||||
<GroupSearch label='Pinned Groups' id='groups' publicOnly />
|
||||
<AsyncButton primary loadingText='Updating...' border mt={3}>
|
||||
Submit
|
||||
</AsyncButton>
|
||||
|
@ -9,6 +9,7 @@ import {
|
||||
Button,
|
||||
BaseImage
|
||||
} from '@tlon/indigo-react';
|
||||
|
||||
import ReconnectButton from './ReconnectButton';
|
||||
import { Dropdown } from './Dropdown';
|
||||
import { StatusBarItem } from './StatusBarItem';
|
||||
@ -19,6 +20,7 @@ import { useTutorialModal } from './useTutorialModal';
|
||||
|
||||
import useHarkState from '~/logic/state/hark';
|
||||
import useInviteState from '~/logic/state/invite';
|
||||
import useContactState from '~/logic/state/contact';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import useLocalState, { selectLocalState } from '~/logic/state/local';
|
||||
import useSettingsState, { selectCalmState } from '~/logic/state/settings';
|
||||
@ -26,8 +28,9 @@ import useSettingsState, { selectCalmState } from '~/logic/state/settings';
|
||||
const localSel = selectLocalState(['toggleOmnibox']);
|
||||
|
||||
const StatusBar = (props) => {
|
||||
const { ourContact, api, ship } = props;
|
||||
const { api, ship } = props;
|
||||
const history = useHistory();
|
||||
const ourContact = useContactState((state) => state.contacts[`~${ship}`]);
|
||||
const notificationsCount = useHarkState((state) => state.notificationsCount);
|
||||
const doNotDisturb = useHarkState((state) => state.doNotDisturb);
|
||||
const inviteState = useInviteState((state) => state.invites);
|
||||
@ -38,7 +41,7 @@ const StatusBar = (props) => {
|
||||
const { toggleOmnibox } = useLocalState(localSel);
|
||||
const { hideAvatars } = useSettingsState(selectCalmState);
|
||||
|
||||
const color = !!ourContact ? `#${uxToHex(props.ourContact.color)}` : '#000';
|
||||
const color = !!ourContact ? `#${uxToHex(ourContact.color)}` : '#000';
|
||||
const xPadding = !hideAvatars && ourContact?.avatar ? '0' : '2';
|
||||
const bgColor = !hideAvatars && ourContact?.avatar ? '' : color;
|
||||
const profileImage =
|
||||
|
Loading…
Reference in New Issue
Block a user