1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Update HotkeyTab.js

Saving a blank hotkey will now display a success message when the user saves the setting with the empty Show/Hide Boostnote hotkey.
This commit is contained in:
Sam Herrington
2018-09-30 09:19:10 -05:00
committed by jacobherrington
parent c761f631a1
commit 025e778252

View File

@@ -32,8 +32,16 @@ class HotkeyTab extends React.Component {
this.state.config.hotkey.toggleMain === '' ||
this.state.config.hotkey.toggleMode === ''
) {
return
}
this.setState({keymapAlert: {
type: 'success',
message: i18n.__('Successfully applied!')
}})
} else {
this.setState({keymapAlert: {
type: 'error',
message: err.message != null ? err.message : i18n.__('Error occurs!')
}})
}}
this.setState({keymapAlert: {
type: 'error',
message: err.message != null ? err.message : i18n.__('An error occurred!')