Fix first-time setup

This commit is contained in:
smartfridge 2022-12-24 19:46:58 +01:00
parent 1e6e6900d4
commit 8cdfac0367
2 changed files with 5 additions and 2 deletions

View file

@ -24,8 +24,7 @@ if (!app.requestSingleInstanceLock()) {
app.quit(); app.quit();
} else { } else {
// Your data now belongs to CCP // Your data now belongs to CCP
let settingsFile = fs.readFileSync(getConfigLocation(), "utf-8"); crashReporter.start({uploadToServer: false});
crashReporter.start({uploadToServer: false, extra: {settingsFile}});
if (process.platform == "linux") { if (process.platform == "linux") {
if (process.env.XDG_SESSION_TYPE == "wayland") { if (process.env.XDG_SESSION_TYPE == "wayland") {

View file

@ -224,6 +224,10 @@ async function doAfterDefiningTheWindow() {
await setLang(Intl.DateTimeFormat().resolvedOptions().locale); await setLang(Intl.DateTimeFormat().resolvedOptions().locale);
mainWindow.setSize(390, 470); mainWindow.setSize(390, 470);
await mainWindow.loadFile(path.join(__dirname, "/content/setup.html")); 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) { } else if ((await getConfig("skipSplash")) == true) {
while (modInstallState == "installing") { while (modInstallState == "installing") {
sleep(1000); sleep(1000);