diff --git a/src/main/index.ts b/src/main/index.ts index d500dd7f2..df9ca3567 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -133,7 +133,7 @@ function bootsharp() { const { height, resizable, width } = options || {} createWindow({ - extraPath: url.replace(DEEPLINK_SCHEME, "/"), + extraPath: `#${url.replace(DEEPLINK_SCHEME, "/")}`, width: width ?? 800, height: height ?? 600, resizable, diff --git a/src/main/window.ts b/src/main/window.ts index 1a2796f68..8e2dfaf61 100644 --- a/src/main/window.ts +++ b/src/main/window.ts @@ -8,6 +8,7 @@ import { BrowserWindow, Menu, shell } from "electron" import { getIconPath } from "./helper" import { store } from "./lib/store" +import { logger } from "./logger" import { cancelPollingUpdateUnreadCount, pollingUpdateUnreadCount, @@ -69,12 +70,20 @@ export function createWindow( window.loadURL( process.env["ELECTRON_RENDERER_URL"] + (options?.extraPath || ""), ) + + logger.log( + process.env["ELECTRON_RENDERER_URL"] + (options?.extraPath || ""), + ) } else { + const openPath = path.resolve( + __dirname, + `../renderer/index.html${options?.extraPath || ""}`, + ) window.loadFile( - path.resolve( - __dirname, - `../renderer/index.html${options?.extraPath || ""}`, - ), + openPath, + ) + logger.log( + openPath, ) }