primero
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
const { app, BrowserWindow } = require("electron");
|
||||
const path = require("node:path");
|
||||
|
||||
function createWindow() {
|
||||
const win = new BrowserWindow({
|
||||
width: 1120,
|
||||
height: 760,
|
||||
minWidth: 760,
|
||||
minHeight: 560,
|
||||
backgroundColor: "#7daeb7",
|
||||
title: "Template Design App",
|
||||
webPreferences: {
|
||||
preload: path.join(__dirname, "preload.cjs"),
|
||||
contextIsolation: true,
|
||||
nodeIntegration: false
|
||||
}
|
||||
});
|
||||
|
||||
win.loadURL("http://localhost:5173");
|
||||
}
|
||||
|
||||
app.whenReady().then(() => {
|
||||
createWindow();
|
||||
app.on("activate", () => {
|
||||
if (BrowserWindow.getAllWindows().length === 0) createWindow();
|
||||
});
|
||||
});
|
||||
|
||||
app.on("window-all-closed", () => {
|
||||
if (process.platform !== "darwin") app.quit();
|
||||
});
|
||||
Reference in New Issue
Block a user