Compare commits
No commits in common. "78e666d6c1e0912a86e00cd06c1064db5dac71f5" and "75595562dba2d15f3a72f475cd9ed3ed18eeeb90" have entirely different histories.
78e666d6c1
...
75595562db
|
@ -4,6 +4,8 @@ import { electronApp, optimizer, is } from '@electron-toolkit/utils'
|
||||||
import icon from '../../resources/icon.png?asset'
|
import icon from '../../resources/icon.png?asset'
|
||||||
import File from './file'
|
import File from './file'
|
||||||
|
|
||||||
|
// const handleUpdate = require("./handleUpdate");
|
||||||
|
|
||||||
File({ app, shell, BrowserWindow, ipcMain })
|
File({ app, shell, BrowserWindow, ipcMain })
|
||||||
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'
|
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'
|
||||||
let mainWindow, loginWindow
|
let mainWindow, loginWindow
|
||||||
|
@ -25,13 +27,10 @@ function createLoginWindow() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// handleUpdate(loginWindow,ipcMain)
|
// handleUpdate(loginWindow,ipcMain)
|
||||||
// const loginURL = is.dev ? `http://localhost:5173/#/login` : `file://${__dirname}/index.html/#/login`
|
const loginURL = is.dev ? `http://localhost:5173/#/login` : join(__dirname, '../renderer/index.html')
|
||||||
// loginWindow.loadURL(loginURL)
|
loginWindow.loadURL(loginURL)
|
||||||
if (is.dev && process.env['ELECTRON_RENDERER_URL']) {
|
|
||||||
loginWindow.loadURL('http://localhost:5173/#/login')
|
|
||||||
} else {
|
|
||||||
loginWindow.loadFile(join(__dirname, '../renderer/index.html'), {hash: 'login'})
|
|
||||||
}
|
|
||||||
|
|
||||||
loginWindow.webContents.openDevTools()
|
loginWindow.webContents.openDevTools()
|
||||||
loginWindow.once('ready-to-show', () => {
|
loginWindow.once('ready-to-show', () => {
|
||||||
|
@ -114,7 +113,6 @@ async function createLinkWin(data) {
|
||||||
|
|
||||||
// 初始化完成
|
// 初始化完成
|
||||||
app.on('ready', () => {
|
app.on('ready', () => {
|
||||||
|
|
||||||
// 设置应用程序用户模型标识符
|
// 设置应用程序用户模型标识符
|
||||||
electronApp.setAppUserModelId('com.electron')
|
electronApp.setAppUserModelId('com.electron')
|
||||||
|
|
||||||
|
@ -172,7 +170,6 @@ app.on('ready', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
createLoginWindow()
|
createLoginWindow()
|
||||||
|
|
||||||
app.on('activate', function () {
|
app.on('activate', function () {
|
||||||
if (BrowserWindow.getAllWindows().length === 0) createLoginWindow()
|
if (BrowserWindow.getAllWindows().length === 0) createLoginWindow()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue