From 8cdfac03673ac1bd735f14ee243a7e5de432329f Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Sat, 24 Dec 2022 19:46:58 +0100 Subject: [PATCH] Fix first-time setup --- src/main.ts | 3 +-- src/window.ts | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 8346346..a3775bf 100644 --- a/src/main.ts +++ b/src/main.ts @@ -24,8 +24,7 @@ if (!app.requestSingleInstanceLock()) { app.quit(); } else { // Your data now belongs to CCP - let settingsFile = fs.readFileSync(getConfigLocation(), "utf-8"); - crashReporter.start({uploadToServer: false, extra: {settingsFile}}); + crashReporter.start({uploadToServer: false}); if (process.platform == "linux") { if (process.env.XDG_SESSION_TYPE == "wayland") { diff --git a/src/window.ts b/src/window.ts index 429e940..45a2383 100644 --- a/src/window.ts +++ b/src/window.ts @@ -224,6 +224,10 @@ async function doAfterDefiningTheWindow() { await setLang(Intl.DateTimeFormat().resolvedOptions().locale); mainWindow.setSize(390, 470); await mainWindow.loadFile(path.join(__dirname, "/content/setup.html")); + let trayPath = nativeImage.createFromPath(path.join(__dirname, "../", `/assets/ac_plug_colored.png`)); + if (process.platform === "darwin" && trayPath.getSize().height > 22) trayPath = trayPath.resize({height: 22}); + if (process.platform === "win32" && trayPath.getSize().height > 32) trayPath = trayPath.resize({height: 32}); + tray.setImage(trayPath); } else if ((await getConfig("skipSplash")) == true) { while (modInstallState == "installing") { sleep(1000);