Add hotkey for bookmarking a toot
This commit is contained in:
@@ -52,6 +52,10 @@ export default class KeyboardShortcuts extends ImmutablePureComponent {
|
||||
<td><kbd>b</kbd></td>
|
||||
<td><FormattedMessage id='keyboard_shortcuts.boost' defaultMessage='to boost' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><kbd>d</kbd></td>
|
||||
<td><FormattedMessage id='keyboard_shortcuts.bookmark' defaultMessage='to bookmark' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><kbd>enter</kbd>, <kbd>o</kbd></td>
|
||||
<td><FormattedMessage id='keyboard_shortcuts.enter' defaultMessage='to open status' /></td>
|
||||
|
@@ -325,6 +325,10 @@ export default class Status extends ImmutablePureComponent {
|
||||
this.handleReblogClick(this.props.status);
|
||||
}
|
||||
|
||||
handleHotkeyBookmark = () => {
|
||||
this.handleBookmarkClick(this.props.status);
|
||||
}
|
||||
|
||||
handleHotkeyMention = e => {
|
||||
e.preventDefault();
|
||||
this.handleMentionClick(this.props.status);
|
||||
@@ -463,6 +467,7 @@ export default class Status extends ImmutablePureComponent {
|
||||
reply: this.handleHotkeyReply,
|
||||
favourite: this.handleHotkeyFavourite,
|
||||
boost: this.handleHotkeyBoost,
|
||||
bookmark: this.handleHotkeyBookmark,
|
||||
mention: this.handleHotkeyMention,
|
||||
openProfile: this.handleHotkeyOpenProfile,
|
||||
toggleSpoiler: this.handleExpandedToggle,
|
||||
|
@@ -98,6 +98,7 @@ const keyMap = {
|
||||
goToMuted: 'g m',
|
||||
goToRequests: 'g r',
|
||||
toggleSpoiler: 'x',
|
||||
bookmark: 'd',
|
||||
};
|
||||
|
||||
@connect(mapStateToProps)
|
||||
|
Reference in New Issue
Block a user