Skip to content

Commit c9c1275

Browse files
[Manager] Add enable/disable toggle for installed node packs (#4157)
1 parent 78ebc54 commit c9c1275

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/components/dialog/content/manager/packCard/PackCardFooter.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,27 @@
66
<i class="pi pi-download text-muted"></i>
77
<span>{{ formattedDownloads }}</span>
88
</div>
9-
<PackInstallButton :node-packs="[nodePack]" />
9+
<PackInstallButton v-if="!isInstalled" :node-packs="[nodePack]" />
10+
<PackEnableToggle v-else :node-pack="nodePack" />
1011
</div>
1112
</template>
1213

1314
<script setup lang="ts">
1415
import { computed } from 'vue'
1516
import { useI18n } from 'vue-i18n'
1617
18+
import PackEnableToggle from '@/components/dialog/content/manager/button/PackEnableToggle.vue'
1719
import PackInstallButton from '@/components/dialog/content/manager/button/PackInstallButton.vue'
20+
import { useComfyManagerStore } from '@/stores/comfyManagerStore'
1821
import type { components } from '@/types/comfyRegistryTypes'
1922
2023
const { nodePack } = defineProps<{
2124
nodePack: components['schemas']['Node']
2225
}>()
2326
27+
const { isPackInstalled } = useComfyManagerStore()
28+
const isInstalled = computed(() => isPackInstalled(nodePack?.id))
29+
2430
const { n } = useI18n()
2531
2632
const formattedDownloads = computed(() =>

0 commit comments

Comments
 (0)