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