From f0a3c5983492130adb7bf6b92d2682b029c302e9 Mon Sep 17 00:00:00 2001 From: Florian Orben Date: Wed, 14 Oct 2015 21:41:03 +0200 Subject: PLT-42: Add "File uploading" text left of "Add Comment" when file is uploading --- web/react/components/create_comment.jsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'web/react/components') 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 = ( + + {this.state.uploadsInProgress.length === 1 ? 'File uploading' : 'Files uploading'} + + ); + } + return (
@@ -295,6 +306,7 @@ export default class CreateComment extends React.Component { value='Add Comment' onClick={this.handleSubmit} /> + {uploadsInProgressText} {postError} {serverError}
-- cgit v1.2.3-1-g7c22