feat: fix editor theme load

This commit is contained in:
Hachi-R 2025-01-30 02:25:41 -03:00
parent f542b2dac0
commit e49a32166a

View file

@ -217,12 +217,6 @@ export class WindowManager {
show: false, show: false,
}); });
if (!app.isPackaged) {
editorWindow.webContents.openDevTools();
} else {
this.mainWindow?.webContents.openDevTools();
}
editorWindow.removeMenu(); editorWindow.removeMenu();
if (is.dev && process.env["ELECTRON_RENDERER_URL"]) { if (is.dev && process.env["ELECTRON_RENDERER_URL"]) {
@ -231,7 +225,7 @@ export class WindowManager {
); );
} else { } else {
editorWindow.loadFile(path.join(__dirname, "../renderer/index.html"), { editorWindow.loadFile(path.join(__dirname, "../renderer/index.html"), {
hash: "editor", hash: `editor?themeId=${themeId}`,
}); });
} }
@ -239,8 +233,10 @@ export class WindowManager {
editorWindow.show(); editorWindow.show();
}); });
WindowManager.mainWindow?.webContents.openDevTools();
editorWindow.on("close", () => { editorWindow.on("close", () => {
this.mainWindow?.webContents.closeDevTools(); WindowManager.mainWindow?.webContents.closeDevTools();
}); });
} }
} }