|
|
|
@ -51,9 +51,10 @@ export default class ConversationItem extends React.PureComponent {
|
|
|
|
|
render() {
|
|
|
|
|
const hasNewClass = this.state.newMessages ? 'has-new-message' : 'nothing-new';
|
|
|
|
|
const isVisible = this.state.displayed ? 'displayed' : 'hidden';
|
|
|
|
|
const isReduced = this.state.displayed ? 'full' : 'reduced';
|
|
|
|
|
const isFocused = this.state.isFocused ? 'isFocused' : 'not-focused';
|
|
|
|
|
const list = (
|
|
|
|
|
<li className={'conversation-item ' + hasNewClass + ' ' + isVisible + ' ' + isFocused}>
|
|
|
|
|
<li className={`conversation-item ${hasNewClass} ${isReduced} ${isFocused}`}>
|
|
|
|
|
<div className='top-title'>
|
|
|
|
|
<i
|
|
|
|
|
role='img'
|
|
|
|
@ -78,31 +79,35 @@ export default class ConversationItem extends React.PureComponent {
|
|
|
|
|
/>
|
|
|
|
|
</button >
|
|
|
|
|
</div >
|
|
|
|
|
<ConversationStream messages={this.props.messages} />
|
|
|
|
|
<div className='conversation_input'>
|
|
|
|
|
<form
|
|
|
|
|
action='#'
|
|
|
|
|
onSubmit={this.submitCompose}
|
|
|
|
|
>
|
|
|
|
|
<textarea
|
|
|
|
|
name='messager'
|
|
|
|
|
id=''
|
|
|
|
|
cols='15'
|
|
|
|
|
rows='3'
|
|
|
|
|
className='messager-textarea'
|
|
|
|
|
placeholder='allez dis nous tout'
|
|
|
|
|
onFocusCapture={this.toggleFocused}
|
|
|
|
|
onBlurCapture={this.toggleFocused}
|
|
|
|
|
onChange={this.handleChange}
|
|
|
|
|
<div className={`body ${isVisible} `} >
|
|
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
<input
|
|
|
|
|
type='submit'
|
|
|
|
|
name='submit'
|
|
|
|
|
value='Send'
|
|
|
|
|
/>
|
|
|
|
|
</form >
|
|
|
|
|
</div >
|
|
|
|
|
<ConversationStream messages={this.props.messages} />
|
|
|
|
|
<div className='conversation_input'>
|
|
|
|
|
<form
|
|
|
|
|
action='#'
|
|
|
|
|
onSubmit={this.submitCompose}
|
|
|
|
|
>
|
|
|
|
|
<textarea
|
|
|
|
|
name='messager'
|
|
|
|
|
id=''
|
|
|
|
|
cols='15'
|
|
|
|
|
rows='3'
|
|
|
|
|
className='messager-textarea'
|
|
|
|
|
placeholder='allez dis nous tout'
|
|
|
|
|
onFocusCapture={this.toggleFocused}
|
|
|
|
|
onBlurCapture={this.toggleFocused}
|
|
|
|
|
onChange={this.handleChange}
|
|
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
<input
|
|
|
|
|
className='messager-send'
|
|
|
|
|
type='submit'
|
|
|
|
|
name='submit'
|
|
|
|
|
value='>'
|
|
|
|
|
/>
|
|
|
|
|
</form >
|
|
|
|
|
</div >
|
|
|
|
|
</div>
|
|
|
|
|
</li >
|
|
|
|
|
);
|
|
|
|
|
return (
|
|
|
|
|