mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 10:16:26 +00:00
Going LIte
This commit is contained in:
@@ -1,6 +1,24 @@
|
||||
import React, { PropTypes } from 'react'
|
||||
import React from 'react'
|
||||
import linkState from 'boost/linkState'
|
||||
import remote from 'remote'
|
||||
import ipc from 'ipc'
|
||||
|
||||
export default class AppSettingTab extends React.Component {
|
||||
constructor (props) {
|
||||
super(props)
|
||||
let keymap = remote.getGlobal('keymap')
|
||||
|
||||
this.state = {
|
||||
toggleFinder: keymap.toggleFinder
|
||||
}
|
||||
}
|
||||
|
||||
handleSaveButtonClick (e) {
|
||||
ipc.send('hotkeyUpdated', {
|
||||
toggleFinder: this.state.toggleFinder
|
||||
})
|
||||
}
|
||||
|
||||
render () {
|
||||
return (
|
||||
<div className='AppSettingTab content'>
|
||||
@@ -8,10 +26,10 @@ export default class AppSettingTab extends React.Component {
|
||||
<div className='sectionTitle'>Hotkey</div>
|
||||
<div className='sectionInput'>
|
||||
<label>Toggle Finder(popup)</label>
|
||||
<input type='text'/>
|
||||
<input valueLink={this.linkState('toggleFinder')} type='text'/>
|
||||
</div>
|
||||
<div className='sectionConfirm'>
|
||||
<button>Save</button>
|
||||
<button onClick={e => this.handleSaveButtonClick(e)}>Save</button>
|
||||
</div>
|
||||
<div className='description'>
|
||||
<ul>
|
||||
@@ -38,3 +56,5 @@ export default class AppSettingTab extends React.Component {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
AppSettingTab.prototype.linkState = linkState
|
||||
|
||||
Reference in New Issue
Block a user