[Manager] Adjust node pack card style according to installing or disabled state (#3103)

This commit is contained in:
Christian Byrne
2025-03-17 17:17:36 -07:00
committed by GitHub
parent 26a7ebdd77
commit 1a120adaea
3 changed files with 77 additions and 37 deletions

View File

@@ -11,9 +11,12 @@
</template>
<script setup lang="ts">
import { inject, ref } from 'vue'
import PackActionButton from '@/components/dialog/content/manager/button/PackActionButton.vue'
import { useComfyManagerStore } from '@/stores/comfyManagerStore'
import {
IsInstallingKey,
ManagerChannel,
ManagerDatabaseSource,
SelectedVersion
@@ -26,6 +29,8 @@ const { nodePacks } = defineProps<{
nodePacks: NodePack[]
}>()
const isInstalling = inject(IsInstallingKey, ref(false))
const managerStore = useComfyManagerStore()
const createPayload = (installItem: NodePack) => {
@@ -50,6 +55,8 @@ const installPack = (item: NodePack) =>
const installAllPacks = async () => {
if (!nodePacks?.length) return
isInstalling.value = true
const uninstalledPacks = nodePacks.filter(
(pack) => !managerStore.isPackInstalled(pack.id)
)