mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-15 10:46:32 +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:
committed by
jacobherrington
parent
c761f631a1
commit
025e778252
@@ -32,8 +32,16 @@ class HotkeyTab extends React.Component {
|
|||||||
this.state.config.hotkey.toggleMain === '' ||
|
this.state.config.hotkey.toggleMain === '' ||
|
||||||
this.state.config.hotkey.toggleMode === ''
|
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: {
|
this.setState({keymapAlert: {
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: err.message != null ? err.message : i18n.__('An error occurred!')
|
message: err.message != null ? err.message : i18n.__('An error occurred!')
|
||||||
|
|||||||
Reference in New Issue
Block a user