diff options
Diffstat (limited to 'app/assets/javascripts/components/components/status.jsx')
-rw-r--r-- | app/assets/javascripts/components/components/status.jsx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/assets/javascripts/components/components/status.jsx b/app/assets/javascripts/components/components/status.jsx index 9f46e0e76..b72198b09 100644 --- a/app/assets/javascripts/components/components/status.jsx +++ b/app/assets/javascripts/components/components/status.jsx @@ -4,6 +4,7 @@ import RelativeTimestamp from './relative_timestamp'; import PureRenderMixin from 'react-addons-pure-render-mixin'; import IconButton from './icon_button'; import DisplayName from './display_name'; +import MediaGallery from './media_gallery'; const Status = React.createClass({ @@ -30,6 +31,8 @@ const Status = React.createClass({ render () { var content = { __html: this.props.status.get('content') }; + var media = ''; + var { status, ...other } = this.props; if (status.get('reblog') !== null) { @@ -45,6 +48,10 @@ const Status = React.createClass({ ); } + if (status.get('media_attachments').size > 0) { + media = <MediaGallery media={status.get('media_attachments')} />; + } + return ( <div style={{ padding: '8px 10px', paddingLeft: '68px', position: 'relative', minHeight: '48px', borderBottom: '1px solid #363c4b', cursor: 'pointer' }}> <div style={{ fontSize: '15px' }}> @@ -63,6 +70,8 @@ const Status = React.createClass({ <div className='status__content' dangerouslySetInnerHTML={content} /> + {media} + <div style={{ marginTop: '10px', overflow: 'hidden' }}> <div style={{ float: 'left', marginRight: '10px'}}><IconButton title='Reply' icon='reply' onClick={this.handleReplyClick} /></div> <div style={{ float: 'left', marginRight: '10px'}}><IconButton active={status.get('reblogged')} title='Reblog' icon='retweet' onClick={this.handleReblogClick} /></div> |