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