🐛 Fix(custom): fix sandbox error under dev mode

This commit is contained in:
Kuingsmile
2023-10-20 21:32:37 +08:00
parent 44998f2116
commit 2dc96f60c6
3 changed files with 153 additions and 205 deletions

View File

@@ -10,7 +10,6 @@ import {
import {
createProtocol
} from 'vue-cli-plugin-electron-builder/lib'
import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'
import beforeOpen from '~/main/utils/beforeOpen'
import ipcList from '~/main/events/ipcList'
import busEventList from '~/main/events/busEventList'
@@ -146,15 +145,7 @@ class LifeCycle {
private onReady () {
const readyFunction = async () => {
console.log('on ready')
createProtocol('picgo')
if (isDevelopment && !process.env.IS_TEST) {
try {
await installExtension(VUEJS_DEVTOOLS)
} catch (e: any) {
console.error('Vue Devtools failed to install:', e.toString())
}
}
windowManager.create(IWindowList.TRAY_WINDOW)
windowManager.create(IWindowList.SETTING_WINDOW)
const isAutoListenClipboard = db.get('settings.isAutoListenClipboard') || false