about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/compose/components/compose_form.js
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-28 20:56:08 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-28 20:58:40 -0500
commit4fc97d77a93c93bfc74c9cd774496ddf8e91c0a7 (patch)
tree62fdd6185ea921c43fc7e35e6d7659c23eb4a317 /app/javascript/flavours/glitch/features/compose/components/compose_form.js
parentb93bf4b27192996a704de9a7cd14c22655a54462 (diff)
add clear button & missing monsterpit visibility icons
Diffstat (limited to 'app/javascript/flavours/glitch/features/compose/components/compose_form.js')
-rw-r--r--app/javascript/flavours/glitch/features/compose/components/compose_form.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/components/compose_form.js b/app/javascript/flavours/glitch/features/compose/components/compose_form.js
index 5a1949e90..ec1f9aa7c 100644
--- a/app/javascript/flavours/glitch/features/compose/components/compose_form.js
+++ b/app/javascript/flavours/glitch/features/compose/components/compose_form.js
@@ -52,6 +52,7 @@ class ComposeForm extends ImmutablePureComponent {
     isUploading: PropTypes.bool,
     onChange: PropTypes.func,
     onSubmit: PropTypes.func,
+    onClearAll: PropTypes.func,
     onClearSuggestions: PropTypes.func,
     onFetchSuggestions: PropTypes.func,
     onSuggestionSelected: PropTypes.func,
@@ -111,6 +112,7 @@ class ComposeForm extends ImmutablePureComponent {
       text,
       mediaDescriptionConfirmation,
       onMediaDescriptionConfirm,
+      onClearAll,
     } = this.props;
 
     //  If something changes inside the textarea, then we update the
@@ -168,6 +170,10 @@ class ComposeForm extends ImmutablePureComponent {
     this.handleSubmit();
   }
 
+  handleClearAll = () => {
+    this.props.onClearAll();
+  }
+
   //  Selects a suggestion from the autofill.
   onSuggestionSelected = (tokenStart, token, value) => {
     this.props.onSuggestionSelected(tokenStart, token, value, ['text']);
@@ -279,6 +285,7 @@ class ComposeForm extends ImmutablePureComponent {
       handleSelect,
       handleSubmit,
       handleRefTextarea,
+      handleClearAll,
     } = this;
     const {
       advancedOptions,
@@ -376,6 +383,7 @@ class ComposeForm extends ImmutablePureComponent {
           disabled={disabledButton}
           onSecondarySubmit={handleSecondarySubmit}
           onSubmit={handleSubmit}
+          onClearAll={handleClearAll}
           privacy={privacy}
           sideArm={sideArm}
         />