2023-08-28 05:23:10 -06:00
|
|
|
const { app, BrowserWindow } = require('electron/main')
|
2022-06-22 02:17:48 -06:00
|
|
|
|
|
|
|
const createWindow = () => {
|
|
|
|
const win = new BrowserWindow({
|
|
|
|
width: 800,
|
2023-04-05 07:42:20 -06:00
|
|
|
height: 600
|
|
|
|
})
|
2022-06-22 02:17:48 -06:00
|
|
|
|
2023-04-05 07:42:20 -06:00
|
|
|
win.loadFile('index.html')
|
|
|
|
}
|
2022-06-22 02:17:48 -06:00
|
|
|
|
|
|
|
app.whenReady().then(() => {
|
2023-04-05 07:42:20 -06:00
|
|
|
createWindow()
|
2022-06-22 02:17:48 -06:00
|
|
|
|
|
|
|
app.on('activate', () => {
|
|
|
|
if (BrowserWindow.getAllWindows().length === 0) {
|
2023-04-05 07:42:20 -06:00
|
|
|
createWindow()
|
2022-06-22 02:17:48 -06:00
|
|
|
}
|
2023-04-05 07:42:20 -06:00
|
|
|
})
|
|
|
|
})
|
2022-06-22 02:17:48 -06:00
|
|
|
|
|
|
|
app.on('window-all-closed', () => {
|
|
|
|
if (process.platform !== 'darwin') {
|
2023-04-05 07:42:20 -06:00
|
|
|
app.quit()
|
2022-06-22 02:17:48 -06:00
|
|
|
}
|
2023-04-05 07:42:20 -06:00
|
|
|
})
|