feat: 样式调整

This commit is contained in:
duanshuwen
2025-12-20 00:02:47 +08:00
parent e6fa999137
commit 062a389c3a
2 changed files with 21 additions and 11 deletions

View File

@@ -44,6 +44,7 @@ const SHARED_WINDOW_OPTIONS = {
class WindowService {
private static _instance: WindowService;
private _logo = createLogo();
private readonly isDev = !!MAIN_WINDOW_VITE_DEV_SERVER_URL
private _winStates: Record<WindowNames | string, WindowState> = {
main: { instance: void 0, isHidden: false, onCreate: [], onClosed: [] },
@@ -103,6 +104,8 @@ class WindowService {
const isHiddenWin = this._isHiddenWin(name);
let window = this._createWinInstance(name, { ...size, ...moreOpts });
if (this.isDev) window.webContents.openDevTools()
!isHiddenWin && this
._setupWinLifecycle(window, name)
._loadWindowTemplate(window, name)