fix: desktop local server failure (#756)

* fix: remote desktop blank screen

* fix: desktop local server failure
This commit is contained in:
Luke Gustafson
2026-05-12 23:54:51 -05:00
committed by GitHub
parent dc79d170b6
commit d2e13cdfd8
3 changed files with 18 additions and 6 deletions
+9 -3
View File
@@ -709,15 +709,21 @@ function createTray() {
try {
const { nativeImage } = require("electron");
// Native APIs (Tray, nativeImage) can't load files from inside app.asar —
// use the unpacked path so the OS sees a real file.
const publicRoot = isDev
? path.join(appRoot, "public")
: path.join(appRoot.replace("app.asar", "app.asar.unpacked"), "public");
let trayIcon;
if (process.platform === "darwin") {
const iconPath = path.join(appRoot, "public", "icons", "16x16.png");
const iconPath = path.join(publicRoot, "icons", "16x16.png");
trayIcon = nativeImage.createFromPath(iconPath);
trayIcon.setTemplateImage(true);
} else if (process.platform === "win32") {
trayIcon = path.join(appRoot, "public", "icon.ico");
trayIcon = path.join(publicRoot, "icon.ico");
} else {
trayIcon = path.join(appRoot, "public", "icons", "32x32.png");
trayIcon = path.join(publicRoot, "icons", "32x32.png");
}
tray = new Tray(trayIcon);