mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
top bar: fall back to preexisting status control
fixes urbit/landscape#531
This commit is contained in:
parent
5a3f88105d
commit
177d5bc11e
@ -13,7 +13,7 @@ import {
|
|||||||
} from '@tlon/indigo-react';
|
} from '@tlon/indigo-react';
|
||||||
|
|
||||||
export function SetStatus(props: any) {
|
export function SetStatus(props: any) {
|
||||||
const { contact, ship, api, callback, smallControl } = props;
|
const { contact, ship, api, callback } = props;
|
||||||
const inputRef = useRef(null);
|
const inputRef = useRef(null);
|
||||||
const [_status, setStatus] = useState('');
|
const [_status, setStatus] = useState('');
|
||||||
const onStatusChange = useCallback(
|
const onStatusChange = useCallback(
|
||||||
@ -35,35 +35,6 @@ export function SetStatus(props: any) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (smallControl) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Row mb='2'>
|
|
||||||
<Text color='gray' fontWeight='500'>
|
|
||||||
Set Status:
|
|
||||||
</Text>
|
|
||||||
</Row>
|
|
||||||
<Row>
|
|
||||||
<Input
|
|
||||||
ref={inputRef}
|
|
||||||
onChange={onStatusChange}
|
|
||||||
value={_status}
|
|
||||||
autocomplete='off'
|
|
||||||
width='100%'
|
|
||||||
onBlur={() => {
|
|
||||||
editStatus();
|
|
||||||
}}
|
|
||||||
onKeyPress={(evt) => {
|
|
||||||
if (evt.key === 'Enter') {
|
|
||||||
editStatus();
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Row>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Row width='100%' my={3}>
|
<Row width='100%' my={3}>
|
||||||
<Input
|
<Input
|
||||||
|
@ -14,7 +14,7 @@ import { Dropdown } from './Dropdown';
|
|||||||
import { StatusBarItem } from './StatusBarItem';
|
import { StatusBarItem } from './StatusBarItem';
|
||||||
import { Sigil } from '~/logic/lib/sigil';
|
import { Sigil } from '~/logic/lib/sigil';
|
||||||
import { uxToHex } from '~/logic/lib/util';
|
import { uxToHex } from '~/logic/lib/util';
|
||||||
import { SetStatus } from '~/views/apps/profile/components/SetStatus';
|
import { ProfileStatus } from './ProfileStatus';
|
||||||
import { useTutorialModal } from './useTutorialModal';
|
import { useTutorialModal } from './useTutorialModal';
|
||||||
|
|
||||||
import useLocalState, { selectLocalState } from '~/logic/state/local';
|
import useLocalState, { selectLocalState } from '~/logic/state/local';
|
||||||
@ -167,11 +167,13 @@ const StatusBar = (props) => {
|
|||||||
System Preferences
|
System Preferences
|
||||||
</Row>
|
</Row>
|
||||||
<Row px={3} pt={2} pb={1} flexDirection='column'>
|
<Row px={3} pt={2} pb={1} flexDirection='column'>
|
||||||
<SetStatus
|
<Text color='gray' fontWeight='500' mb='1'>
|
||||||
ship={`~${ship}`}
|
Set Status:
|
||||||
|
</Text>
|
||||||
|
<ProfileStatus
|
||||||
contact={ourContact}
|
contact={ourContact}
|
||||||
|
ship={`~${ship}`}
|
||||||
api={api}
|
api={api}
|
||||||
smallControl={true}
|
|
||||||
/>
|
/>
|
||||||
</Row>
|
</Row>
|
||||||
</Col>
|
</Col>
|
||||||
|
Loading…
Reference in New Issue
Block a user