fix: correctly handle config updates

fix: synchronise updates to config with preload
fix: send config on web contents load
fix: hide menu when custom frame is off
chore: add workarounds for developing on Nix
chore: bump version to 1.1.10
This commit is contained in:
izzy
2025-10-10 12:28:03 +01:00
parent 8fd6f35729
commit 2517f412ab
6 changed files with 72 additions and 8 deletions
+8 -2
View File
@@ -40,8 +40,8 @@ export function createMainWindow() {
mainWindow = new BrowserWindow({
minWidth: 300,
minHeight: 300,
width: 1100,
height: 600,
width: 1280,
height: 720,
backgroundColor: "#191919",
frame: !config.customFrame,
icon: windowIcon,
@@ -54,6 +54,9 @@ export function createMainWindow() {
},
});
// hide the options
mainWindow.setMenu(null);
// maximise the window if it was maximised before
if (config.windowState.isMaximised) {
mainWindow.maximize();
@@ -101,6 +104,9 @@ export function createMainWindow() {
}
});
// send the config
mainWindow.webContents.on("did-finish-load", () => config.sync());
// configure spellchecker context menu
mainWindow.webContents.on("context-menu", (_, params) => {
const menu = new Menu();