Fix desktop API called when frontend settings loaded

This commit is contained in:
filtered
2025-01-11 23:20:44 +11:00
parent 5f90dd9c3f
commit 6df7a45d61

View File

@@ -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)