about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features
diff options
context:
space:
mode:
authorStarfall <root@starfall.blue>2020-03-01 14:49:21 -0600
committerStarfall <root@starfall.blue>2020-03-01 14:49:21 -0600
commit12d35783db1bb302d7540d8d3690ab6eed3dac3b (patch)
tree66f1db08a2f6f9ae2254ba7a81b71835039d671e /app/javascript/flavours/glitch/features
parent22a55edc158352003a3953964c9d332a60c86428 (diff)
Revert "Merge branch 'glitch'"
Login is broken

This reverts commit 22a55edc158352003a3953964c9d332a60c86428, reversing
changes made to 5902299384d15249fe4b84b8761d4a49f3c7f6fd.
Diffstat (limited to 'app/javascript/flavours/glitch/features')
-rw-r--r--app/javascript/flavours/glitch/features/compose/components/compose_form.js12
-rw-r--r--app/javascript/flavours/glitch/features/compose/components/publisher.js8
-rw-r--r--app/javascript/flavours/glitch/features/keyboard_shortcuts/index.js4
3 files changed, 8 insertions, 16 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 daacbb73f..6e07998ec 100644
--- a/app/javascript/flavours/glitch/features/compose/components/compose_form.js
+++ b/app/javascript/flavours/glitch/features/compose/components/compose_form.js
@@ -93,7 +93,7 @@ class ComposeForm extends ImmutablePureComponent {
     }
   }
 
-  handleSubmit = (overriddenVisibility = null) => {
+  handleSubmit = () => {
     const { textarea: { value }, uploadForm } = this;
     const {
       onChange,
@@ -106,7 +106,6 @@ class ComposeForm extends ImmutablePureComponent {
       text,
       mediaDescriptionConfirmation,
       onMediaDescriptionConfirm,
-      onChangeVisibility,
     } = this.props;
 
     //  If something changes inside the textarea, then we update the
@@ -125,9 +124,6 @@ class ComposeForm extends ImmutablePureComponent {
       const firstWithoutDescription = media.find(item => !item.get('description'));
       onMediaDescriptionConfirm(this.context.router ? this.context.router.history : null, firstWithoutDescription.get('id'));
     } else if (onSubmit) {
-      if (onChangeVisibility && overriddenVisibility) {
-        onChangeVisibility(overriddenVisibility);
-      }
       onSubmit(this.context.router ? this.context.router.history : null);
     }
   }
@@ -156,9 +152,13 @@ class ComposeForm extends ImmutablePureComponent {
   //  Handles the secondary submit button.
   handleSecondarySubmit = () => {
     const {
+      onChangeVisibility,
       sideArm,
     } = this.props;
-    this.handleSubmit(sideArm === 'none' ? null : sideArm);
+    if (sideArm !== 'none' && onChangeVisibility) {
+      onChangeVisibility(sideArm);
+    }
+    this.handleSubmit();
   }
 
   //  Selects a suggestion from the autofill.
diff --git a/app/javascript/flavours/glitch/features/compose/components/publisher.js b/app/javascript/flavours/glitch/features/compose/components/publisher.js
index 97890f40d..b8d9d98bf 100644
--- a/app/javascript/flavours/glitch/features/compose/components/publisher.js
+++ b/app/javascript/flavours/glitch/features/compose/components/publisher.js
@@ -38,12 +38,8 @@ class Publisher extends ImmutablePureComponent {
     sideArm: PropTypes.oneOf(['none', 'direct', 'private', 'unlisted', 'public']),
   };
 
-  handleSubmit = () => {
-    this.props.onSubmit();
-  };
-
   render () {
-    const { countText, disabled, intl, onSecondarySubmit, privacy, sideArm } = this.props;
+    const { countText, disabled, intl, onSecondarySubmit, onSubmit, privacy, sideArm } = this.props;
 
     const diff = maxChars - length(countText || '');
     const computedClass = classNames('composer--publisher', {
@@ -109,7 +105,7 @@ class Publisher extends ImmutablePureComponent {
             }
           }()}
           title={`${intl.formatMessage(messages.publish)}: ${intl.formatMessage({ id: `privacy.${privacy}.short` })}`}
-          onClick={this.handleSubmit}
+          onClick={onSubmit}
           disabled={disabled || diff < 0}
         />
       </div>
diff --git a/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.js b/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.js
index 0bb71e872..bc7571200 100644
--- a/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.js
+++ b/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.js
@@ -114,10 +114,6 @@ class KeyboardShortcuts extends ImmutablePureComponent {
                 <td><FormattedMessage id='keyboard_shortcuts.search' defaultMessage='to focus search' /></td>
               </tr>
               <tr>
-                <td><kbd>alt</kbd>+<kbd>enter</kbd></td>
-                <td><FormattedMessage id='keyboard_shortcuts.secondary_toot' defaultMessage='to send toot using secondary privacy setting' /></td>
-              </tr>
-              <tr>
                 <td><kbd>esc</kbd></td>
                 <td><FormattedMessage id='keyboard_shortcuts.unfocus' defaultMessage='to un-focus compose textarea/search' /></td>
               </tr>