diff --git a/.changes/disable-window-controls-api-options.md b/.changes/disable-window-controls-api-options.md index 258f9201..6602e068 100644 --- a/.changes/disable-window-controls-api-options.md +++ b/.changes/disable-window-controls-api-options.md @@ -1,5 +1,5 @@ --- -'window-js': 'minor:feat' +"window-js": "minor:feat" --- Added the `maximizable`, `minimizable` and `closable` fields on `WindowOptions`. diff --git a/.changes/disable-window-controls-api.md b/.changes/disable-window-controls-api.md index a4579ef9..a0e46af5 100644 --- a/.changes/disable-window-controls-api.md +++ b/.changes/disable-window-controls-api.md @@ -1,6 +1,6 @@ --- -'window': 'minor:feat' -'window-js': 'minor:feat' +"window": "minor:feat" +"window-js": "minor:feat" --- Added the `setMaximizable`, `setMinimizable`, `setClosable`, `isMaximizable`, `isMinimizable` and `isClosable` methods. diff --git a/plugins/window/guest-js/index.ts b/plugins/window/guest-js/index.ts index 57cbbe97..77b37bd4 100644 --- a/plugins/window/guest-js/index.ts +++ b/plugins/window/guest-js/index.ts @@ -1184,12 +1184,12 @@ class WindowManager extends WebviewWindowHandle { label: this.label, value: size ? { - type: size.type, - data: { - width: size.width, - height: size.height, - }, - } + type: size.type, + data: { + width: size.width, + height: size.height, + }, + } : null, }); } @@ -1220,12 +1220,12 @@ class WindowManager extends WebviewWindowHandle { label: this.label, value: size ? { - type: size.type, - data: { - width: size.width, - height: size.height, - }, - } + type: size.type, + data: { + width: size.width, + height: size.height, + }, + } : null, }); } @@ -2024,26 +2024,26 @@ interface WindowOptions { /** * Whether the window's native maximize button is enabled or not. Defaults to `true`. */ - maximizable?: boolean + maximizable?: boolean; /** * Whether the window's native minimize button is enabled or not. Defaults to `true`. */ - minimizable?: boolean + minimizable?: boolean; /** * Whether the window's native close button is enabled or not. Defaults to `true`. */ - closable?: boolean + closable?: boolean; } function mapMonitor(m: Monitor | null): Monitor | null { return m === null ? null : { - name: m.name, - scaleFactor: m.scaleFactor, - position: mapPhysicalPosition(m.position), - size: mapPhysicalSize(m.size), - }; + name: m.name, + scaleFactor: m.scaleFactor, + position: mapPhysicalPosition(m.position), + size: mapPhysicalSize(m.size), + }; } function mapPhysicalPosition(m: PhysicalPosition): PhysicalPosition {