1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 02:36:36 +00:00

hotkey config

This commit is contained in:
Dick Choi
2016-07-22 08:39:25 +09:00
parent a6e3dbd825
commit 40410eb10f
6 changed files with 43 additions and 74 deletions

View File

@@ -25,7 +25,7 @@ class ConfigTab extends React.Component {
this.handleSettingDone = () => {
this.setState({keymapAlert: {
type: 'success',
message: 'Successfully done!'
message: 'Successfully applied!'
}})
}
this.handleSettingError = (err) => {
@@ -43,20 +43,17 @@ class ConfigTab extends React.Component {
ipc.removeListener('APP_SETTING_ERROR', this.handleSettingError)
}
submitHotKey () {
ipc.send('hotkeyUpdated', this.state.keymap)
}
submitConfig () {
ipc.send('configUpdated', this.state.config)
}
handleSaveButtonClick (e) {
this.submitHotKey()
}
let newConfig = {
hotkey: this.state.config.hotkey
}
handleConfigSaveButtonClick (e) {
this.submitConfig()
ConfigManager.set(newConfig)
store.dispatch({
type: 'SET_UI',
config: newConfig
})
}
handleKeyDown (e) {
@@ -183,6 +180,7 @@ class ConfigTab extends React.Component {
ref='toggleFinder'
value={config.hotkey.toggleFinder}
type='text'
disabled
/>
</div>
</div>