mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-14 08:34:25 +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';
|
||||
|
||||
export function SetStatus(props: any) {
|
||||
const { contact, ship, api, callback, smallControl } = props;
|
||||
const { contact, ship, api, callback } = props;
|
||||
const inputRef = useRef(null);
|
||||
const [_status, setStatus] = useState('');
|
||||
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 (
|
||||
<Row width='100%' my={3}>
|
||||
<Input
|
||||
|
@ -14,7 +14,7 @@ import { Dropdown } from './Dropdown';
|
||||
import { StatusBarItem } from './StatusBarItem';
|
||||
import { Sigil } from '~/logic/lib/sigil';
|
||||
import { uxToHex } from '~/logic/lib/util';
|
||||
import { SetStatus } from '~/views/apps/profile/components/SetStatus';
|
||||
import { ProfileStatus } from './ProfileStatus';
|
||||
import { useTutorialModal } from './useTutorialModal';
|
||||
|
||||
import useLocalState, { selectLocalState } from '~/logic/state/local';
|
||||
@ -167,11 +167,13 @@ const StatusBar = (props) => {
|
||||
System Preferences
|
||||
</Row>
|
||||
<Row px={3} pt={2} pb={1} flexDirection='column'>
|
||||
<SetStatus
|
||||
ship={`~${ship}`}
|
||||
<Text color='gray' fontWeight='500' mb='1'>
|
||||
Set Status:
|
||||
</Text>
|
||||
<ProfileStatus
|
||||
contact={ourContact}
|
||||
ship={`~${ship}`}
|
||||
api={api}
|
||||
smallControl={true}
|
||||
/>
|
||||
</Row>
|
||||
</Col>
|
||||
|
Loading…
Reference in New Issue
Block a user