2020-10-26 15:18:23 +03:00
|
|
|
const path = require('path');
|
2021-06-06 22:04:43 +03:00
|
|
|
const { app, BrowserWindow, session } = require('electron');
|
2020-10-26 15:18:23 +03:00
|
|
|
|
|
|
|
app.on('window-all-closed', app.quit);
|
2021-06-06 22:04:43 +03:00
|
|
|
app.whenReady().then(async () => {
|
|
|
|
await session.defaultSession.loadExtension(
|
2022-11-07 03:26:12 +03:00
|
|
|
path.join(__dirname, '../../../dist'),
|
2023-07-12 21:03:20 +03:00
|
|
|
{ allowFileAccess: true },
|
2020-10-26 15:18:23 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
const mainWindow = new BrowserWindow({
|
|
|
|
width: 150,
|
|
|
|
height: 100,
|
2021-06-06 22:04:43 +03:00
|
|
|
webPreferences: {
|
|
|
|
nodeIntegration: true,
|
|
|
|
contextIsolation: false,
|
|
|
|
},
|
2020-10-26 15:18:23 +03:00
|
|
|
});
|
2021-06-06 22:04:43 +03:00
|
|
|
mainWindow.loadFile('index.html');
|
|
|
|
mainWindow.webContents.openDevTools({ mode: 'detach' });
|
2020-10-26 15:18:23 +03:00
|
|
|
});
|