1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +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

@@ -1,6 +1,8 @@
import _ from 'lodash'
const OSX = global.process.platform === 'darwin'
const electron = require('electron')
const { ipcRenderer } = electron
const defaultConfig = {
zoom: 1,
@@ -64,8 +66,17 @@ function set (updates) {
let newConfig = Object.assign({}, defaultConfig, currentConfig, updates)
if (!validate(newConfig)) throw new Error('INVALID CONFIG')
_save(newConfig)
ipcRenderer.send('CONFIG_RENEW', {
config: get(),
silent: false
})
}
ipcRenderer.send('CONFIG_RENEW', {
config: get(),
silent: true
})
export default {
get,
set,