1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 02:06:29 +00:00

EnterでSubmitができる - Hotkey, folder edit, folder create(preference/create new folder modal両方)

This commit is contained in:
Rokt33r
2015-11-16 02:45:46 +09:00
parent 1fe15bc6a5
commit 7e04fd342c
4 changed files with 31 additions and 5 deletions

View File

@@ -36,12 +36,20 @@ export default class AppSettingTab extends React.Component {
ipc.removeListener('APP_SETTING_ERROR', this.handleSettingError)
}
handleSaveButtonClick (e) {
submitHotKey () {
ipc.send('hotkeyUpdated', {
toggleFinder: this.state.toggleFinder
})
}
handleSaveButtonClick (e) {
this.submitHotKey()
}
handleKeyDown (e) {
this.submitHotKey()
}
render () {
let alert = this.state.alert
let alertElement = alert != null ? (
@@ -56,7 +64,7 @@ export default class AppSettingTab extends React.Component {
<div className='sectionTitle'>Hotkey</div>
<div className='sectionInput'>
<label>Toggle Finder(popup)</label>
<input valueLink={this.linkState('toggleFinder')} type='text'/>
<input onKeyDown={e => this.handleKeyDown(e)} valueLink={this.linkState('toggleFinder')} type='text'/>
</div>
<div className='sectionConfirm'>
<button onClick={e => this.handleSaveButtonClick(e)}>Save</button>