mirror of
https://github.com/urbit/shrub.git
synced 2024-12-23 19:05:48 +03:00
chat: threshold send button & chatinput fixes
This commit is contained in:
parent
9587ccf5ca
commit
47c8075294
@ -9,7 +9,7 @@ import GlobalApi from '~/logic/api/global';
|
|||||||
import { Envelope } from '~/types/chat-update';
|
import { Envelope } from '~/types/chat-update';
|
||||||
import { StorageState } from '~/types';
|
import { StorageState } from '~/types';
|
||||||
import { Contacts, Content } from '@urbit/api';
|
import { Contacts, Content } from '@urbit/api';
|
||||||
import { Row, BaseImage, Box, Icon, LoadingSpinner } from '@tlon/indigo-react';
|
import { Row, BaseImage, Box, Icon, LoadingSpinner, Text } from '@tlon/indigo-react';
|
||||||
import withStorage from '~/views/components/withStorage';
|
import withStorage from '~/views/components/withStorage';
|
||||||
import { withLocalState } from '~/logic/state/local';
|
import { withLocalState } from '~/logic/state/local';
|
||||||
|
|
||||||
@ -182,7 +182,15 @@ class ChatInput extends Component<ChatInputProps, ChatInputState> {
|
|||||||
onPaste={this.onPaste.bind(this)}
|
onPaste={this.onPaste.bind(this)}
|
||||||
placeholder='Message...'
|
placeholder='Message...'
|
||||||
/>
|
/>
|
||||||
<Box mx={2} flexShrink={0} height='16px' width='16px' flexBasis='16px'>
|
<Box mx='12px' flexShrink={0} height='16px' width='16px' flexBasis='16px'>
|
||||||
|
<Icon
|
||||||
|
icon='Dojo'
|
||||||
|
cursor='pointer'
|
||||||
|
onClick={this.toggleCode}
|
||||||
|
color={state.inCodeMode ? 'blue' : 'black'}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
<Box ml='12px' mr={3} flexShrink={0} height='16px' width='16px' flexBasis='16px'>
|
||||||
{this.props.canUpload ? (
|
{this.props.canUpload ? (
|
||||||
this.props.uploading ? (
|
this.props.uploading ? (
|
||||||
<LoadingSpinner />
|
<LoadingSpinner />
|
||||||
@ -199,13 +207,15 @@ class ChatInput extends Component<ChatInputProps, ChatInputState> {
|
|||||||
)
|
)
|
||||||
) : null}
|
) : null}
|
||||||
</Box>
|
</Box>
|
||||||
<Box mr={2} flexShrink={0} height='16px' width='16px' flexBasis='16px'>
|
<Box mx={3} flexShrink={0} height='16px'>
|
||||||
<Icon
|
<Text
|
||||||
icon='Dojo'
|
bold
|
||||||
cursor='pointer'
|
color="blue"
|
||||||
onClick={this.toggleCode}
|
cursor="pointer"
|
||||||
color={state.inCodeMode ? 'blue' : 'black'}
|
onClick={() => console.log(this.chatEditor.current.submit())}
|
||||||
/>
|
>
|
||||||
|
Send
|
||||||
|
</Text>
|
||||||
</Box>
|
</Box>
|
||||||
</Row>
|
</Row>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user