From 5e59e1a7d11772fc38ce11f361d98fc701e23f6b Mon Sep 17 00:00:00 2001 From: Chubby Granny Chaser Date: Mon, 13 Oct 2025 18:12:07 +0100 Subject: [PATCH] feat: adding uuid library --- src/main/services/window-manager.ts | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/main/services/window-manager.ts b/src/main/services/window-manager.ts index bb7142ba..70ff130e 100644 --- a/src/main/services/window-manager.ts +++ b/src/main/services/window-manager.ts @@ -58,18 +58,16 @@ export class WindowManager { // HMR for renderer base on electron-vite cli. // Load the remote URL for development or the local html file for production. if (is.dev && process.env["ELECTRON_RENDERER_URL"]) { - this.mainWindow?.loadURL(`http://192.168.1.159:8001#/${hash}`); + this.mainWindow?.loadURL( + `${process.env["ELECTRON_RENDERER_URL"]}#/${hash}` + ); } else { - this.mainWindow - ?.loadURL(`http://192.168.1.159:8001/#/${hash}`) - .catch(() => { - this.mainWindow?.loadFile( - path.join(__dirname, "../renderer/index.html"), - { - hash, - } - ); - }); + this.mainWindow?.loadFile( + path.join(__dirname, "../renderer/index.html"), + { + hash, + } + ); } }