]> cat aescling's git repositories - mastodon.git/commitdiff
Add hotkey for follow requests (#8307)
authorAnnika Backstrom <annika@sixohthree.com>
Mon, 20 Aug 2018 01:44:16 +0000 (21:44 -0400)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 20 Aug 2018 01:44:16 +0000 (03:44 +0200)
app/javascript/mastodon/features/ui/index.js

index 67484fc6393bf3fd7e98d160517123ea6585d230..34d52a7d226dac046c21bdb3532726624582b8cb 100644 (file)
@@ -89,6 +89,7 @@ const keyMap = {
   goToProfile: 'g u',
   goToBlocked: 'g b',
   goToMuted: 'g m',
+  goToRequests: 'g r',
   toggleHidden: 'x',
 };
 
@@ -427,6 +428,10 @@ export default class UI extends React.PureComponent {
     this.context.router.history.push('/mutes');
   }
 
+  handleHotkeyGoToRequests = () => {
+    this.context.router.history.push('/follow_requests');
+  }
+
   render () {
     const { draggingOver } = this.state;
     const { children, isComposing, location, dropdownMenuIsOpen } = this.props;
@@ -449,6 +454,7 @@ export default class UI extends React.PureComponent {
       goToProfile: this.handleHotkeyGoToProfile,
       goToBlocked: this.handleHotkeyGoToBlocked,
       goToMuted: this.handleHotkeyGoToMuted,
+      goToRequests: this.handleHotkeyGoToRequests,
     };
 
     return (