diff --git a/assets/desktop.ico b/assets/desktop.ico new file mode 100644 index 00000000..dcaf4dba Binary files /dev/null and b/assets/desktop.ico differ diff --git a/assets/desktop.png b/assets/desktop.png index 940c5944..1d1350bb 100644 Binary files a/assets/desktop.png and b/assets/desktop.png differ diff --git a/assets/icon.png b/assets/icon.png index 3504d0de..940c5944 100644 Binary files a/assets/icon.png and b/assets/icon.png differ diff --git a/build/icon.png b/build/icon.png deleted file mode 100644 index 1d1350bb..00000000 Binary files a/build/icon.png and /dev/null differ diff --git a/package-lock.json b/package-lock.json index 4985940f..1e661daf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,7 +35,7 @@ "typescript": "4.9.5" }, "engines": { - "node": ">=16.0.0" + "node": ">=16.17.1" } }, "node_modules/@develar/schema-utils": { diff --git a/src/common/config.ts b/src/common/config.ts index 03021aee..0da7b6e1 100644 --- a/src/common/config.ts +++ b/src/common/config.ts @@ -127,6 +127,7 @@ export async function checkIfConfigIsBroken(): Promise { export function setup(): void { console.log("Setting up temporary ArmCord settings."); const isLinux = process.platform === "linux"; + const isWin = process.platform === "win32"; const defaults: Settings = { windowStyle: isLinux ? "native" : "default", channel: "stable", @@ -150,7 +151,9 @@ export function setup(): void { trayIcon: "default", doneSetup: false, clientName: "ArmCord", - customIcon: path.join(__dirname, "../", "/assets/desktop.png") + customIcon: isWin + ? path.join(__dirname, "../", "/assets/desktop.ico") + : path.join(__dirname, "../", "/assets/desktop.png") }; setConfigBulk({ ...defaults diff --git a/src/main.ts b/src/main.ts index 50068c65..f77efa7f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -69,7 +69,7 @@ if (!app.requestSingleInstanceLock() && getConfigSync("multiInstance") == (false app.commandLine.appendSwitch("enable-features", "WebRTCPipeWireCapturer"); console.log("Wayland detected, using PipeWire for video capture."); } - // work around chrome 66 disabling autoplay by default + // work around chromium 66 disabling autoplay by default app.commandLine.appendSwitch("autoplay-policy", "no-user-gesture-required"); // WinRetrieveSuggestionsOnlyOnDemand: Work around electron 13 bug w/ async spellchecking on Windows. // HardwareMediaKeyHandling,MediaSessionService: Prevent Discord from registering as a media service. @@ -85,6 +85,8 @@ if (!app.requestSingleInstanceLock() && getConfigSync("multiInstance") == (false app.whenReady().then(async () => { if ((await getConfig("customIcon")) !== undefined ?? null) { iconPath = await getConfig("customIcon"); + } else if (process.platform === "win32") { + iconPath = path.join(__dirname, "../", "/assets/desktop.ico"); } else { iconPath = path.join(__dirname, "../", "/assets/desktop.png"); } diff --git a/src/setup/setup.html b/src/setup/setup.html index 2287f2bf..e8f8a000 100644 --- a/src/setup/setup.html +++ b/src/setup/setup.html @@ -127,15 +127,15 @@ "linuxNotice" ).innerHTML = `Linux may not work well with tray icons. Depending on your system configuration, you may not be able to see the tray icon. Enable at your own risk. Can be changed later.`; } - let useNativeLinux; + let windowStyleDefault; if (window.armcordinternal.getOS == "linux") { - useNativeLinux = "native"; + windowStyleDefault = "native"; } else { - useNativeLinux = "default"; + windowStyleDefault = "default"; } document.getElementById("next-page4").addEventListener("click", () => { window.armcordinternal.saveSettings({ - windowStyle: useNativeLinux, + windowStyle: windowStyleDefault, channel: options.channel, armcordCSP: true, minimizeToTray: true,