Move setting declarations from ui to coreSettings (#847)

* Move setting declarations from ui to coreSettings

* nit

* nit

* Move effect to vue component
This commit is contained in:
Chenlei Hu
2024-09-16 17:47:47 +09:00
committed by GitHub
parent 45a866f194
commit 2b60244e4a
3 changed files with 101 additions and 92 deletions

View File

@@ -4,10 +4,23 @@
<script setup lang="ts">
import { app } from '@/scripts/app'
import { onMounted, ref } from 'vue'
import { useSettingStore } from '@/stores/settingStore'
import { onMounted, ref, watch } from 'vue'
const container = ref<HTMLDivElement | null>(null)
const settingStore = useSettingStore()
watch(
() => settingStore.get('Comfy.DevMode'),
(value) => {
const element = document.getElementById('comfy-dev-save-api-button')
if (element) {
element.style.display = value ? 'flex' : 'none'
}
},
{ immediate: true }
)
onMounted(() => {
app.ui.setup(container.value)
})