diff options
author | Florian Orben <florian.orben@gmail.com> | 2015-10-14 21:41:03 +0200 |
---|---|---|
committer | Florian Orben <florian.orben@gmail.com> | 2015-10-14 21:48:32 +0200 |
commit | f0a3c5983492130adb7bf6b92d2682b029c302e9 (patch) | |
tree | 9c3594718f274a9269c02ffce3d0c49d7c1af2ab /web/react | |
parent | 830e8b04d9cbc5652ab8b23d469e1c75ff5f8516 (diff) | |
download | chat-f0a3c5983492130adb7bf6b92d2682b029c302e9.tar.gz chat-f0a3c5983492130adb7bf6b92d2682b029c302e9.tar.bz2 chat-f0a3c5983492130adb7bf6b92d2682b029c302e9.zip |
PLT-42: Add "File uploading" text left of "Add Comment" when file is uploading
Diffstat (limited to 'web/react')
-rw-r--r-- | web/react/components/create_comment.jsx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/web/react/components/create_comment.jsx b/web/react/components/create_comment.jsx index 680d693f1..2ac5d2179 100644 --- a/web/react/components/create_comment.jsx +++ b/web/react/components/create_comment.jsx @@ -255,6 +255,17 @@ export default class CreateComment extends React.Component { postFooterClassName += ' has-error'; } + let uploadsInProgressText = null; + if (this.state.uploadsInProgress.length > 0) { + uploadsInProgressText = ( + <span + className='pull-right post-right-comments-upload-in-progress' + > + {this.state.uploadsInProgress.length === 1 ? 'File uploading' : 'Files uploading'} + </span> + ); + } + return ( <form onSubmit={this.handleSubmit}> <div className='post-create'> @@ -295,6 +306,7 @@ export default class CreateComment extends React.Component { value='Add Comment' onClick={this.handleSubmit} /> + {uploadsInProgressText} {postError} {serverError} </div> |