1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 10:46:32 +00:00

added hotkey setting for direction toggle

This commit is contained in:
Itai Braude
2019-10-18 00:36:51 +03:00
parent 2cb4cbe1b6
commit 45e75cdfe9
4 changed files with 20 additions and 1 deletions

View File

@@ -30,7 +30,8 @@ class HotkeyTab extends React.Component {
this.handleSettingError = (err) => {
if (
this.state.config.hotkey.toggleMain === '' ||
this.state.config.hotkey.toggleMode === ''
this.state.config.hotkey.toggleMode === '' ||
this.state.config.hotkey.toggleDirection === ''
) {
this.setState({keymapAlert: {
type: 'success',
@@ -79,6 +80,7 @@ class HotkeyTab extends React.Component {
config.hotkey = Object.assign({}, config.hotkey, {
toggleMain: this.refs.toggleMain.value,
toggleMode: this.refs.toggleMode.value,
toggleDirection: this.refs.toggleDirection.value,
deleteNote: this.refs.deleteNote.value,
pasteSmartly: this.refs.pasteSmartly.value,
prettifyMarkdown: this.refs.prettifyMarkdown.value,
@@ -154,6 +156,17 @@ class HotkeyTab extends React.Component {
/>
</div>
</div>
<div styleName='group-section'>
<div styleName='group-section-label'>{i18n.__('Toggle Direction')}</div>
<div styleName='group-section-control'>
<input styleName='group-section-control-input'
onChange={(e) => this.handleHotkeyChange(e)}
ref='toggleDirection'
value={config.hotkey.toggleDirection}
type='text'
/>
</div>
</div>
<div styleName='group-section'>
<div styleName='group-section-label'>{i18n.__('Delete Note')}</div>
<div styleName='group-section-control'>