enhance ui style; fix devtools cannot popup

This commit is contained in:
geekgeekrun
2025-04-12 21:39:37 +08:00
parent e162bc4948
commit 1c616e5b90
3 changed files with 25 additions and 27 deletions
+6 -2
View File
@@ -23,8 +23,6 @@ export function createMainWindow(): BrowserWindow {
}
})
process.env.NODE_ENV === 'development' && openDevTools(mainWindow)
mainWindow.on('ready-to-show', () => {
mainWindow.show()
})
@@ -36,6 +34,12 @@ export function createMainWindow(): BrowserWindow {
show: true
})
})
mainWindow.on('ready-to-show', async () => {
process.env.NODE_ENV === 'development' &&
setTimeout(() => {
mainWindow && openDevTools(mainWindow)
}, 500)
})
mainWindow.webContents.setWindowOpenHandler((details) => {
shell.openExternal(details.url)