This commit is contained in:
2026-06-24 15:10:50 +02:00
commit a3e7512f95
212 changed files with 212927 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
const { app, BrowserWindow } = require('electron')
const path = require('path')
const isDev = require('electron-is-dev')
let mainWindow
const createWindow = () => {
mainWindow = new BrowserWindow({
width: 800,
height: 600,
icon: path.join(__dirname, 'media/icons/electron.png'),
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
},
})
mainWindow.loadURL(
isDev
? 'http://localhost:3000'
: `file://${path.join(__dirname, '..', 'build', 'index.html')}`
)
mainWindow.on('closed', () => (mainWindow = null))
}
app.disableHardwareAcceleration()
app.on('ready', createWindow)
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', () => {
if (mainWindow === null) {
createWindow()
}
})