[Glitch] Add g+e keyboard shortcut for /explore (trending)
Port 87004ddb96c766a3dce889bad098c16f80bb3d0a to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
1b92ac0729
commit
739c35811e
@ -119,6 +119,7 @@ const hotkeyMatcherMap = {
|
|||||||
openMedia: just('e'),
|
openMedia: just('e'),
|
||||||
onTranslate: just('t'),
|
onTranslate: just('t'),
|
||||||
goToHome: sequence('g', 'h'),
|
goToHome: sequence('g', 'h'),
|
||||||
|
goToExplore: sequence('g', 'e'),
|
||||||
goToNotifications: sequence('g', 'n'),
|
goToNotifications: sequence('g', 'n'),
|
||||||
goToLocal: sequence('g', 'l'),
|
goToLocal: sequence('g', 'l'),
|
||||||
goToFederated: sequence('g', 't'),
|
goToFederated: sequence('g', 't'),
|
||||||
|
|||||||
@ -142,6 +142,10 @@ class KeyboardShortcuts extends ImmutablePureComponent {
|
|||||||
<td><kbd>g</kbd>+<kbd>h</kbd></td>
|
<td><kbd>g</kbd>+<kbd>h</kbd></td>
|
||||||
<td><FormattedMessage id='keyboard_shortcuts.home' defaultMessage='to open home timeline' /></td>
|
<td><FormattedMessage id='keyboard_shortcuts.home' defaultMessage='to open home timeline' /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><kbd>g</kbd>+<kbd>e</kbd></td>
|
||||||
|
<td><FormattedMessage id='keyboard_shortcuts.explore' defaultMessage='to open trending timeline' /></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><kbd>g</kbd>+<kbd>n</kbd></td>
|
<td><kbd>g</kbd>+<kbd>n</kbd></td>
|
||||||
<td><FormattedMessage id='keyboard_shortcuts.notifications' defaultMessage='to open notifications column' /></td>
|
<td><FormattedMessage id='keyboard_shortcuts.notifications' defaultMessage='to open notifications column' /></td>
|
||||||
|
|||||||
@ -580,6 +580,10 @@ class UI extends PureComponent {
|
|||||||
this.props.history.push('/home');
|
this.props.history.push('/home');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleHotkeyGoToExplore = () => {
|
||||||
|
this.props.history.push('/explore');
|
||||||
|
};
|
||||||
|
|
||||||
handleHotkeyGoToNotifications = () => {
|
handleHotkeyGoToNotifications = () => {
|
||||||
this.props.history.push('/notifications');
|
this.props.history.push('/notifications');
|
||||||
};
|
};
|
||||||
@ -648,6 +652,7 @@ class UI extends PureComponent {
|
|||||||
moveToTop: this.handleMoveToTop,
|
moveToTop: this.handleMoveToTop,
|
||||||
back: this.handleHotkeyBack,
|
back: this.handleHotkeyBack,
|
||||||
goToHome: this.handleHotkeyGoToHome,
|
goToHome: this.handleHotkeyGoToHome,
|
||||||
|
goToExplore: this.handleHotkeyGoToExplore,
|
||||||
goToNotifications: this.handleHotkeyGoToNotifications,
|
goToNotifications: this.handleHotkeyGoToNotifications,
|
||||||
goToLocal: this.handleHotkeyGoToLocal,
|
goToLocal: this.handleHotkeyGoToLocal,
|
||||||
goToFederated: this.handleHotkeyGoToFederated,
|
goToFederated: this.handleHotkeyGoToFederated,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user