mirror of
https://github.com/LukeHagar/idn-admin-console.git
synced 2025-12-09 20:47:46 +00:00
Disabling auto-update until code signing is in place.
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
const windowStateManager = require('electron-window-state');
|
const windowStateManager = require("electron-window-state");
|
||||||
const { app, BrowserWindow } = require('electron');
|
const { app, BrowserWindow } = require("electron");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const { is } = require("@electron-toolkit/utils");
|
const { is } = require("@electron-toolkit/utils");
|
||||||
const { updateElectronApp } = require("update-electron-app");
|
// const { updateElectronApp } = require("update-electron-app");
|
||||||
const handlerPkg = import(
|
const handlerPkg = import(
|
||||||
is.dev
|
is.dev
|
||||||
? "../../Sveltekit-Build/src/handler.js"
|
? "../../Sveltekit-Build/src/handler.js"
|
||||||
@@ -18,13 +18,13 @@ const log = require("electron-log/main");
|
|||||||
log.info(
|
log.info(
|
||||||
"==================================Log Start=================================="
|
"==================================Log Start=================================="
|
||||||
);
|
);
|
||||||
try {
|
// try {
|
||||||
log.info("Trying to update...");
|
// log.info("Trying to update...");
|
||||||
updateElectronApp();
|
// updateElectronApp();
|
||||||
} catch (e) {
|
// } catch (e) {
|
||||||
log.info("Error updating");
|
// log.info("Error updating");
|
||||||
log.info(e);
|
// log.info(e);
|
||||||
}
|
// }
|
||||||
const port = 3000;
|
const port = 3000;
|
||||||
const origin = `http://localhost:${port}`;
|
const origin = `http://localhost:${port}`;
|
||||||
log.info(`Starting server on ${origin}...`);
|
log.info(`Starting server on ${origin}...`);
|
||||||
@@ -69,8 +69,8 @@ const createWindow = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const mainWindow = new BrowserWindow({
|
const mainWindow = new BrowserWindow({
|
||||||
backgroundColor: 'whitesmoke',
|
backgroundColor: "whitesmoke",
|
||||||
titleBarStyle: 'default',
|
titleBarStyle: "default",
|
||||||
autoHideMenuBar: false,
|
autoHideMenuBar: false,
|
||||||
trafficLightPosition: {
|
trafficLightPosition: {
|
||||||
x: 17,
|
x: 17,
|
||||||
@@ -83,7 +83,7 @@ const createWindow = () => {
|
|||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
spellcheck: false,
|
spellcheck: false,
|
||||||
devTools: true,
|
devTools: true,
|
||||||
preload: path.join(__dirname, 'preload.cjs'),
|
preload: path.join(__dirname, "preload.cjs"),
|
||||||
},
|
},
|
||||||
x: windowState.x,
|
x: windowState.x,
|
||||||
y: windowState.y,
|
y: windowState.y,
|
||||||
@@ -95,12 +95,12 @@ const createWindow = () => {
|
|||||||
// and load the index.html of the app.
|
// and load the index.html of the app.
|
||||||
mainWindow.loadURL(origin);
|
mainWindow.loadURL(origin);
|
||||||
|
|
||||||
mainWindow.once('ready-to-show', () => {
|
mainWindow.once("ready-to-show", () => {
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
mainWindow.focus();
|
mainWindow.focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
mainWindow.on('close', () => {
|
mainWindow.on("close", () => {
|
||||||
windowState.saveState(mainWindow);
|
windowState.saveState(mainWindow);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user