You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // @flow
  2. import React from 'react';
  3. import { translate } from '../../../base/i18n';
  4. import { JitsiModal } from '../../../base/modal';
  5. import { connect } from '../../../base/redux';
  6. import { CHAT_VIEW_MODAL_ID } from '../../constants';
  7. import AbstractChat, {
  8. _mapDispatchToProps,
  9. _mapStateToProps,
  10. type Props
  11. } from '../AbstractChat';
  12. import ChatInputBar from './ChatInputBar';
  13. import MessageContainer from './MessageContainer';
  14. import MessageRecipient from './MessageRecipient';
  15. /**
  16. * Implements a React native component that renders the chat window (modal) of
  17. * the mobile client.
  18. */
  19. class Chat extends AbstractChat<Props> {
  20. /**
  21. * Implements React's {@link Component#render()}.
  22. *
  23. * @inheritdoc
  24. */
  25. render() {
  26. return (
  27. <JitsiModal
  28. headerProps = {{
  29. headerLabelKey: 'chat.title'
  30. }}
  31. modalId = { CHAT_VIEW_MODAL_ID }>
  32. <MessageContainer messages = { this.props._messages } />
  33. <MessageRecipient />
  34. <ChatInputBar onSend = { this.props._onSendMessage } />
  35. </JitsiModal>
  36. );
  37. }
  38. }
  39. export default translate(connect(_mapStateToProps, _mapDispatchToProps)(Chat));