mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 18:52:19 +00:00
[Manager] Add enable/disable toggle for installed node packs (#4157)
This commit is contained in:
@@ -6,7 +6,8 @@
|
|||||||
<i class="pi pi-download text-muted"></i>
|
<i class="pi pi-download text-muted"></i>
|
||||||
<span>{{ formattedDownloads }}</span>
|
<span>{{ formattedDownloads }}</span>
|
||||||
</div>
|
</div>
|
||||||
<PackInstallButton :node-packs="[nodePack]" />
|
<PackInstallButton v-if="!isInstalled" :node-packs="[nodePack]" />
|
||||||
|
<PackEnableToggle v-else :node-pack="nodePack" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -14,13 +15,18 @@
|
|||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
|
import PackEnableToggle from '@/components/dialog/content/manager/button/PackEnableToggle.vue'
|
||||||
import PackInstallButton from '@/components/dialog/content/manager/button/PackInstallButton.vue'
|
import PackInstallButton from '@/components/dialog/content/manager/button/PackInstallButton.vue'
|
||||||
|
import { useComfyManagerStore } from '@/stores/comfyManagerStore'
|
||||||
import type { components } from '@/types/comfyRegistryTypes'
|
import type { components } from '@/types/comfyRegistryTypes'
|
||||||
|
|
||||||
const { nodePack } = defineProps<{
|
const { nodePack } = defineProps<{
|
||||||
nodePack: components['schemas']['Node']
|
nodePack: components['schemas']['Node']
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
const { isPackInstalled } = useComfyManagerStore()
|
||||||
|
const isInstalled = computed(() => isPackInstalled(nodePack?.id))
|
||||||
|
|
||||||
const { n } = useI18n()
|
const { n } = useI18n()
|
||||||
|
|
||||||
const formattedDownloads = computed(() =>
|
const formattedDownloads = computed(() =>
|
||||||
|
|||||||
Reference in New Issue
Block a user