General bug fixes from testing, refresh on shop change, update display

This commit is contained in:
Patrick Fic
2025-04-14 15:59:04 -07:00
parent 0ec741912e
commit affe412586
7 changed files with 131 additions and 58 deletions

View File

@@ -1,4 +1,4 @@
import { is, optimizer } from "@electron-toolkit/utils";
import { is, optimizer, platform } from "@electron-toolkit/utils";
import Sentry from "@sentry/electron/main";
import {
app,
@@ -88,7 +88,10 @@ function createWindow(): void {
// { role: 'fileMenu' }
{
label: "File",
submenu: [isMac ? { role: "close" } : { role: "quit" }],
submenu: [
...(!isMac ? [{ role: "about" }] : []),
isMac ? { role: "close" } : { role: "quit" },
],
},
// { role: 'editMenu' }
{
@@ -149,7 +152,7 @@ function createWindow(): void {
},
},
{
label: "Check for Updates",
label: `Check for Updates (${app.getVersion()})`,
click: (): void => {
checkForAppUpdates();
},
@@ -169,6 +172,7 @@ function createWindow(): void {
store.set("app.isTest", !currentSetting);
log.info("Setting isTest to: ", !currentSetting);
app.relaunch(); // Relaunch the app
preQuitMethods(); //Quitting handlers aren't called. Manually execute to clean up the app.
app.exit(0); // Exit the current instance
},
},
@@ -321,6 +325,10 @@ app.whenReady().then(async () => {
// Default open or close DevTools by F12 in development
// and ignore CommandOrControl + R in production.
// see https://github.com/alex8088/electron-toolkit/tree/master/packages/utils
if (platform.isWindows) {
app.setAppUserModelId(app.name);
}
app.on("browser-window-created", (_, window) => {
optimizer.watchWindowShortcuts(window);
});