fix(setting): no modified value saved (#130)

* fix: save setting value

* prepare release 2.3.3
This commit is contained in:
Hayden
2025-02-10 13:51:45 +08:00
committed by GitHub
parent 55a4eff01b
commit 7e58d0a82d
2 changed files with 13 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ import SettingCardSize from 'components/SettingCardSize.vue'
import { request } from 'hooks/request'
import { defineStore } from 'hooks/store'
import { $el, app, ComfyDialog } from 'scripts/comfyAPI'
import { computed, onMounted, onUnmounted, readonly, ref } from 'vue'
import { computed, onMounted, onUnmounted, readonly, ref, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { useToast } from './toast'
@@ -66,6 +66,17 @@ export const useConfig = defineStore('config', (store) => {
},
}
watch(cardSizeFlag, (val) => {
app.ui?.settings.setSettingValue('ModelManager.UI.CardSize', val)
})
watch(cardSizeMap, (val) => {
app.ui?.settings.setSettingValue(
'ModelManager.UI.CardSizeMap',
JSON.stringify(val),
)
})
useAddConfigSettings(store)
return config