1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-21 05:31:45 +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>

View File

@@ -34,6 +34,8 @@
border solid 1px $border-color
border-radius 2px
padding 0 5px
&:disabled
background-color $ui-input--disabled-backgroundColor
.group-checkBoxSection
margin-bottom 15px
@@ -47,6 +49,12 @@
box-sizing border-box
height 40px
text-align right
:global
.alert
font-size 12px
line-height 30px
padding 0 5px
float right
.group-control-leftButton
float left
colorDefaultButton()

View File

@@ -2,9 +2,9 @@ import React, { PropTypes } from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './InfoTab.styl'
const appVersion = global.process.version
const electron = require('electron')
const { shell } = electron
const { shell, remote } = electron
const appVersion = remote.app.getVersion()
class InfoTab extends React.Component {
constructor (props) {