diff --git a/src/components/dialog/content/SettingDialogContent.vue b/src/components/dialog/content/SettingDialogContent.vue index 2e0c93b26..98a9f3a6e 100644 --- a/src/components/dialog/content/SettingDialogContent.vue +++ b/src/components/dialog/content/SettingDialogContent.vue @@ -188,7 +188,7 @@ const searchResults = computed(() => { const groupedSettings: { [key: string]: SettingParams[] } = {} filteredSettingIds.value.forEach((id) => { - const setting = settingStore.settings[id] + const setting = settingStore.settingsById[id] const info = getSettingInfo(setting) const groupLabel = info.subCategory @@ -215,7 +215,7 @@ const searchResults = computed(() => { const searchResultsCategories = computed>(() => { return new Set( filteredSettingIds.value.map( - (id) => getSettingInfo(settingStore.settings[id]).category + (id) => getSettingInfo(settingStore.settingsById[id]).category ) ) }) diff --git a/src/scripts/ui/settings.ts b/src/scripts/ui/settings.ts index 65d028913..8cfe3cda9 100644 --- a/src/scripts/ui/settings.ts +++ b/src/scripts/ui/settings.ts @@ -27,7 +27,7 @@ export class ComfySettingsDialog extends ComfyDialog { private tryMigrateDeprecatedValue(id: string, value: any) { if (this.app.vueAppReady) { const settingStore = useSettingStore() - const setting = settingStore.settings[id] + const setting = settingStore.settingsById[id] if (setting?.migrateDeprecatedValue) { return setting.migrateDeprecatedValue(value) } @@ -149,7 +149,7 @@ export class ComfySettingsDialog extends ComfyDialog { this.settingsParamLookup[id] = params if (this.app.vueAppReady) { - useSettingStore().settings[id] = params + useSettingStore().settingsById[id] = params } this.settingsLookup[id] = { id, diff --git a/src/stores/settingStore.ts b/src/stores/settingStore.ts index 8844375dd..1936068e1 100644 --- a/src/stores/settingStore.ts +++ b/src/stores/settingStore.ts @@ -33,11 +33,11 @@ export interface SettingTreeNode extends TreeNode { export const useSettingStore = defineStore('setting', () => { const settingValues = ref>({}) - const settings = ref>({}) + const settingsById = ref>({}) const settingTree = computed(() => { const root = buildTree( - Object.values(settings.value).filter( + Object.values(settingsById.value).filter( (setting: SettingParams) => setting.type !== 'hidden' ), (setting: SettingParams) => setting.category || setting.id.split('.') @@ -62,7 +62,7 @@ export const useSettingStore = defineStore('setting', () => { const value = settingsDialog.getSettingValue(id) settingValues.value[id] = value } - settings.value = settingsDialog.settingsParamLookup + settingsById.value = settingsDialog.settingsParamLookup CORE_SETTINGS.forEach((setting: SettingParams) => { settingsDialog.addSetting(setting) @@ -92,7 +92,7 @@ export const useSettingStore = defineStore('setting', () => { return { settingValues, - settings, + settingsById, settingTree, addSettings, loadExtensionSettings, diff --git a/src/stores/workspaceStore.ts b/src/stores/workspaceStore.ts index 1d4b06e5e..c3da55d8d 100644 --- a/src/stores/workspaceStore.ts +++ b/src/stores/workspaceStore.ts @@ -26,7 +26,7 @@ export const useWorkspaceStore = defineStore('workspace', () => { })) const sidebarTab = computed(() => useSidebarTabStore()) const setting = computed(() => ({ - settings: useSettingStore().settings, + settings: useSettingStore().settingsById, get: useSettingStore().get, set: useSettingStore().set }))