[Desktop] Fix unnecessary setting update (#2301)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
filtered
2025-01-21 06:00:35 +11:00
committed by GitHub
parent 87fc7a2c5d
commit f9be20fa78
2 changed files with 6 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
import { t } from '@/i18n'
import { app } from '@/scripts/app'
import { useDialogService } from '@/services/dialogService'
import { useSettingStore } from '@/stores/settingStore'
import { useWorkflowStore } from '@/stores/workflowStore'
import { electronAPI as getElectronAPI, isElectron } from '@/utils/envUtil'
@@ -41,18 +42,18 @@ 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',
experimental: true,
defaultValue: 'default',
options: ['default', 'custom'],
onChange: (
newValue: 'default' | 'custom',
oldValue: 'default' | 'custom'
oldValue?: 'default' | 'custom'
) => {
electronAPI.Config.setWindowStyle(newValue)
if (!oldValue) return
onChangeRestartApp(newValue, oldValue)
electronAPI.Config.setWindowStyle(newValue)
}
}
],

View File

@@ -7,7 +7,7 @@
},
"Comfy-Desktop_WindowStyle": {
"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",
"options": {
"default": "default",
"custom": "custom"