更新electron到 10.1.0

This commit is contained in:
lyswhut
2020-08-29 14:44:37 +08:00
parent b453a8934f
commit 86478c0268
21 changed files with 228 additions and 157 deletions
+11 -1
View File
@@ -1,5 +1,10 @@
const { mainSend, NAMES: { mainWindow: ipcMainWindowNames }, mainOn } = require('../../common/ipc')
const Store = require('electron-store')
const { mainSend, NAMES: { mainWindow: ipcMainWindowNames }, mainOn, mainHandle } = require('../../common/ipc')
const { mainWindow: MAIN_WINDOW_EVENT_NAME, hotKey: HOT_KEY_EVENT_NAME } = require('../events/_name')
const electronStore_hotKey = new Store({
name: 'hotKey',
})
// const { registerHotkey, unRegisterHotkey } = require('../modules/hotKey/utils')
// mainHandle(ipcMainWindowNames.set_hot_key_config, async(event, { action, data }) => {
@@ -14,6 +19,11 @@ const { mainWindow: MAIN_WINDOW_EVENT_NAME, hotKey: HOT_KEY_EVENT_NAME } = requi
// }
// })
mainHandle(ipcMainWindowNames.get_hot_key, async() => ({
local: electronStore_hotKey.get('local'),
global: electronStore_hotKey.get('global'),
}))
mainOn(ipcMainWindowNames.quit, () => global.lx_event.mainWindow.quit())
mainOn(ipcMainWindowNames.min_toggle, () => global.lx_event.mainWindow.toggleMinimize())
mainOn(ipcMainWindowNames.hide_toggle, () => global.lx_event.mainWindow.toggleHide())