diff --git a/css/icon.png b/css/icon.png new file mode 100644 index 00000000..65b51ab3 Binary files /dev/null and b/css/icon.png differ diff --git a/desktop/main.js b/desktop/main.js index 8815a927..e36b33dc 100644 --- a/desktop/main.js +++ b/desktop/main.js @@ -42,6 +42,10 @@ function resolveUserDataDir() { } const stateFile = path.join(resolveUserDataDir(), "cache", "window-state.json"); +// css/ sits next to main.js in portable builds, one level up in dev. +const portableIcon = path.join(baseDir, "css", "icon.png"); +const iconPath = fs.existsSync(portableIcon) ? portableIcon : path.join(baseDir, "..", "css", "icon.png"); + let serverProcess = null; let mainWindow = null; let portCheckInterval = null; @@ -110,6 +114,7 @@ function createWindow(port) { mainWindow = new BrowserWindow({ ...bounds, title: TITLE, + icon: iconPath, autoHideMenuBar: true, webPreferences: { preload: path.join(__dirname, "preload.js"), diff --git a/server.py b/server.py index 1591a3ab..74cf0100 100644 --- a/server.py +++ b/server.py @@ -242,6 +242,7 @@ def create_interface(): ssl_certfile=shared.args.ssl_certfile, root_path=shared.args.subpath, allowed_paths=allowed_paths, + favicon_path='css/icon.png', )