summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-10-15 12:22:10 -0400
committerChristopher Speller <crspeller@gmail.com>2015-10-15 12:22:10 -0400
commitadc20981e2c370f09467d4fa249065d23f533a0a (patch)
treec67754d90b06cd265079afea2e043b2cff94ca43 /web
parent0fb45dad1825789079068e05d675225bc03bf222 (diff)
parentf0a3c5983492130adb7bf6b92d2682b029c302e9 (diff)
downloadchat-adc20981e2c370f09467d4fa249065d23f533a0a.tar.gz
chat-adc20981e2c370f09467d4fa249065d23f533a0a.tar.bz2
chat-adc20981e2c370f09467d4fa249065d23f533a0a.zip
Merge pull request #1055 from florianorben/PLT-42
PLT-42: Add "File uploading" text left of "Add Comment" when file is uploading
Diffstat (limited to 'web')
-rw-r--r--web/react/components/create_comment.jsx12
-rw-r--r--web/sass-files/sass/partials/_post_right.scss5
2 files changed, 17 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>
diff --git a/web/sass-files/sass/partials/_post_right.scss b/web/sass-files/sass/partials/_post_right.scss
index e4860b286..b72176a11 100644
--- a/web/sass-files/sass/partials/_post_right.scss
+++ b/web/sass-files/sass/partials/_post_right.scss
@@ -36,6 +36,11 @@
.post-create-footer {
padding-top: 10px;
}
+ .post-right-comments-upload-in-progress {
+ padding: 6px 0;
+ color: #a8adb7;
+ margin-right: 10px;
+ }
}
}