sforkowany z mirror/soapbox
Chats: add label to send button
rodzic
3b8eed17b6
commit
2dd3b39e7e
|
@ -18,6 +18,7 @@ import IconButton from 'soapbox/components/icon_button';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
placeholder: { id: 'chat_box.input.placeholder', defaultMessage: 'Send a message…' },
|
placeholder: { id: 'chat_box.input.placeholder', defaultMessage: 'Send a message…' },
|
||||||
|
send: { id: 'chat_box.actions.send', defaultMessage: 'Send' },
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapStateToProps = (state, { chatId }) => ({
|
const mapStateToProps = (state, { chatId }) => ({
|
||||||
|
@ -164,11 +165,17 @@ class ChatBox extends ImmutablePureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderActionButton = () => {
|
renderActionButton = () => {
|
||||||
|
const { intl } = this.props;
|
||||||
const { resetFileKey } = this.state;
|
const { resetFileKey } = this.state;
|
||||||
|
|
||||||
return this.canSubmit() ? (
|
return this.canSubmit() ? (
|
||||||
<div className='chat-box__send'>
|
<div className='chat-box__send'>
|
||||||
<IconButton icon='send' size={16} onClick={this.sendMessage} />
|
<IconButton
|
||||||
|
icon='send'
|
||||||
|
title={intl.formatMessage(messages.send)}
|
||||||
|
size={16}
|
||||||
|
onClick={this.sendMessage}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<UploadButton onSelectFile={this.handleFiles} resetFileKey={resetFileKey} />
|
<UploadButton onSelectFile={this.handleFiles} resetFileKey={resetFileKey} />
|
||||||
|
|
Ładowanie…
Reference in New Issue