fix(stage-tamagotchi): remove devtools auto-open from onboarding window
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { join, resolve } from 'node:path'
|
||||
|
||||
import { is } from '@electron-toolkit/utils'
|
||||
import { defineInvokeHandler } from '@moeru/eventa'
|
||||
import { createContext } from '@moeru/eventa/adapters/electron/main'
|
||||
import { BrowserWindow, ipcMain, shell } from 'electron'
|
||||
@@ -59,16 +58,6 @@ export function setupOnboardingWindowManager(): OnboardingWindowManager {
|
||||
},
|
||||
})
|
||||
|
||||
// NOTICE: in development mode, open devtools by default
|
||||
if (is.dev) {
|
||||
try {
|
||||
newWindow.webContents.openDevTools({ mode: 'detach' })
|
||||
}
|
||||
catch (err) {
|
||||
console.error('failed to open devtools:', err)
|
||||
}
|
||||
}
|
||||
|
||||
newWindow.on('ready-to-show', () => newWindow.show())
|
||||
newWindow.webContents.setWindowOpenHandler((details) => {
|
||||
shell.openExternal(details.url)
|
||||
|
||||
Reference in New Issue
Block a user