新增打开主窗口开发者工具快捷键
parent
57122c6eea
commit
5146f083ff
|
@ -11,6 +11,7 @@ const names = {
|
|||
clear_env_params_deeplink: 'clear_env_params_deeplink',
|
||||
wait: 'wait',
|
||||
wait_cancel: 'wait_cancel',
|
||||
open_dev_tools: 'open_dev_tools',
|
||||
|
||||
set_music_meta: 'set_music_meta',
|
||||
progress: 'progress',
|
||||
|
|
|
@ -21,6 +21,7 @@ require('./lyric')
|
|||
require('./musicUrl')
|
||||
require('./systemFonts')
|
||||
require('./wait')
|
||||
require('./openDevtools')
|
||||
|
||||
// require('./kw_decodeLyric')
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
const { mainOn, NAMES: { mainWindow: ipcMainWindowNames } } = require('../../common/ipc')
|
||||
|
||||
mainOn(ipcMainWindowNames.open_dev_tools, event => {
|
||||
if (global.modules.mainWindow) {
|
||||
if (global.modules.mainWindow.isDevToolsOpened()) {
|
||||
global.modules.mainWindow.webContents.closeDevTools()
|
||||
} else {
|
||||
global.modules.mainWindow.webContents.openDevTools({
|
||||
mode: 'undocked',
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
|
@ -105,3 +105,7 @@ eventHub.on(syncName.send_sync_list, ({ action, data }) => {
|
|||
if (!sync.enable) return
|
||||
rendererSend(NAMES.mainWindow.sync_list, { action, data })
|
||||
})
|
||||
eventHub.on('key_mod+f12_down', ({ action, data }) => {
|
||||
if (!sync.enable) return
|
||||
rendererSend(NAMES.mainWindow.open_dev_tools)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue