26 lines
534 B
JavaScript
26 lines
534 B
JavaScript
const { app, BrowserWindow } = require('electron')
|
|
const path = require('path')
|
|
|
|
function createWindow() {
|
|
const win = new BrowserWindow({
|
|
width: 1400,
|
|
height: 900,
|
|
backgroundColor: '#0f1115',
|
|
webPreferences: {
|
|
nodeIntegration: true,
|
|
contextIsolation: false
|
|
}
|
|
})
|
|
|
|
const devUrl = process.env.VITE_DEV_SERVER_URL || 'http://127.0.0.1:5178'
|
|
win.loadURL(devUrl)
|
|
}
|
|
|
|
app.whenReady().then(createWindow)
|
|
|
|
app.on('window-all-closed', () => {
|
|
if (process.platform !== 'darwin') {
|
|
app.quit()
|
|
}
|
|
})
|