mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
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:
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user