瀏覽代碼

Add hotkey for follow requests (#8307)

master
Annika Backstrom 5 年之前
committed by Eugen Rochko
父節點
當前提交
25f6f41052
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. +6
    -0
      app/javascript/mastodon/features/ui/index.js

+ 6
- 0
app/javascript/mastodon/features/ui/index.js 查看文件

@@ -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 (


Loading…
取消
儲存