mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-23 16:24:06 +00:00
Fix desktop API called when frontend settings loaded
This commit is contained in:
@@ -39,14 +39,16 @@ import { electronAPI as getElectronAPI, isElectron } from '@/utils/envUtil'
|
||||
id: 'Comfy-Desktop.WindowStyle',
|
||||
category: ['Comfy-Desktop', 'General', 'Window Style'],
|
||||
name: 'Window Style',
|
||||
tooltip: 'Choose custom option to hide the system title bar',
|
||||
tooltip: "Custom: Replace the system title bar with ComfyUI's Top menu",
|
||||
type: 'combo',
|
||||
defaultValue: 'default',
|
||||
options: ['default', 'custom'],
|
||||
onChange: (
|
||||
newValue: 'default' | 'custom',
|
||||
oldValue: 'default' | 'custom'
|
||||
oldValue?: 'default' | 'custom'
|
||||
) => {
|
||||
if (!oldValue) return
|
||||
|
||||
electronAPI.Config.setWindowStyle(newValue)
|
||||
|
||||
onChangeRestartApp(newValue, oldValue)
|
||||
|
||||
Reference in New Issue
Block a user