From 45a96e899e96da846dbef0d39d6f02db790fccaa Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 27 Sep 2016 17:02:30 +0200 Subject: [PATCH] Fix #58 - disable compose form while image is uploading --- .../components/features/ui/components/compose_form.jsx | 8 +++++--- .../features/ui/containers/compose_form_container.jsx | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/components/features/ui/components/compose_form.jsx b/app/assets/javascripts/components/features/ui/components/compose_form.jsx index 5542b4fb4..5b00fc1b9 100644 --- a/app/assets/javascripts/components/features/ui/components/compose_form.jsx +++ b/app/assets/javascripts/components/features/ui/components/compose_form.jsx @@ -10,6 +10,7 @@ const ComposeForm = React.createClass({ propTypes: { text: React.PropTypes.string.isRequired, is_submitting: React.PropTypes.bool, + is_uploading: React.PropTypes.bool, in_reply_to: ImmutablePropTypes.map, onChange: React.PropTypes.func.isRequired, onSubmit: React.PropTypes.func.isRequired, @@ -39,7 +40,8 @@ const ComposeForm = React.createClass({ }, render () { - let replyArea = ''; + let replyArea = ''; + const disabled = this.props.is_submitting || this.props.is_uploading; if (this.props.in_reply_to) { replyArea = ; @@ -49,10 +51,10 @@ const ComposeForm = React.createClass({
{replyArea} -