about summary refs log tree commit diff
path: root/app/assets/javascripts/components/features/status
diff options
context:
space:
mode:
authorblackle <isabelle@blackle-mori.com>2017-04-11 08:34:14 -0400
committerblackle <isabelle@blackle-mori.com>2017-04-11 08:34:14 -0400
commitf53fb6aa660834074bbbffac5b1fe5ea0cc85edf (patch)
tree61f9076b3cfee49c31b33700af92eebf492658e2 /app/assets/javascripts/components/features/status
parent01e5447e3582787bf2370b9a483963953bdbb075 (diff)
Bypass boost confirm modal if alt is pressed
Diffstat (limited to 'app/assets/javascripts/components/features/status')
-rw-r--r--app/assets/javascripts/components/features/status/components/action_bar.jsx4
-rw-r--r--app/assets/javascripts/components/features/status/index.jsx8
2 files changed, 8 insertions, 4 deletions
diff --git a/app/assets/javascripts/components/features/status/components/action_bar.jsx b/app/assets/javascripts/components/features/status/components/action_bar.jsx
index 2aebcd709..fdcb8b980 100644
--- a/app/assets/javascripts/components/features/status/components/action_bar.jsx
+++ b/app/assets/javascripts/components/features/status/components/action_bar.jsx
@@ -37,8 +37,8 @@ const ActionBar = React.createClass({
     this.props.onReply(this.props.status);
   },
 
-  handleReblogClick () {
-    this.props.onReblog(this.props.status);
+  handleReblogClick (e) {
+    this.props.onReblog(this.props.status, e);
   },
 
   handleFavouriteClick () {
diff --git a/app/assets/javascripts/components/features/status/index.jsx b/app/assets/javascripts/components/features/status/index.jsx
index 8b5019b57..94ccaf535 100644
--- a/app/assets/javascripts/components/features/status/index.jsx
+++ b/app/assets/javascripts/components/features/status/index.jsx
@@ -86,11 +86,15 @@ const Status = React.createClass({
     this.props.dispatch(reblog(status));
   },
 
-  handleReblogClick (status) {
+  handleReblogClick (status, e) {
     if (status.get('reblogged')) {
       this.props.dispatch(unreblog(status));
     } else {
-      this.props.dispatch(openModal('BOOST', { status, onReblog: this.handleModalReblog }));
+      if (e.altKey) {
+        this.handleModalReblog(status);
+      } else {
+        this.props.dispatch(openModal('BOOST', { status, onReblog: this.handleModalReblog }));
+      }
     }
   },