42 lines
808 B
JavaScript
42 lines
808 B
JavaScript
// main.js
|
|
// const { app, BrowserWindow} = require('electron');
|
|
const { app, BrowserWindow, ipcMain} = require('electron');
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
const jquery = require('jquery');
|
|
|
|
let mainWindow;
|
|
|
|
function createWindow() {
|
|
mainWindow = new BrowserWindow({
|
|
width: 1200,
|
|
height: 800,
|
|
webPreferences: {
|
|
nodeIntegration: true,
|
|
contextIsolation: false
|
|
}
|
|
});
|
|
|
|
mainWindow.loadFile('dashboard.html'); // Create an HTML file for your interface
|
|
|
|
mainWindow.on('closed', function () {
|
|
mainWindow = null;
|
|
});
|
|
}
|
|
|
|
app.on('ready', createWindow);
|
|
|
|
app.on('window-all-closed', function () {
|
|
if (process.platform !== 'darwin') {
|
|
app.quit();
|
|
}
|
|
});
|
|
|
|
app.on('activate', function () {
|
|
if (mainWindow === null) {
|
|
createWindow();
|
|
}
|
|
});
|
|
|
|
|