From 450c3b00a5cc13d4aaa82571067449d71c7ffd90 Mon Sep 17 00:00:00 2001 From: bymyself Date: Mon, 14 Apr 2025 17:46:03 -0700 Subject: [PATCH] dont show missing nodes button in legacy manager mode --- .../dialog/content/LoadWorkflowWarning.vue | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/src/components/dialog/content/LoadWorkflowWarning.vue b/src/components/dialog/content/LoadWorkflowWarning.vue index 41d422d20..96c632be8 100644 --- a/src/components/dialog/content/LoadWorkflowWarning.vue +++ b/src/components/dialog/content/LoadWorkflowWarning.vue @@ -31,7 +31,7 @@ -
+
import Button from 'primevue/button' import ListBox from 'primevue/listbox' -import { computed } from 'vue' +import { computed, onMounted, ref } from 'vue' import NoResultsPlaceholder from '@/components/common/NoResultsPlaceholder.vue' -import MissingCoreNodesMessage from '@/components/dialog/content/MissingCoreNodesMessage.vue' -import PackInstallButton from '@/components/dialog/content/manager/button/PackInstallButton.vue' import { useMissingNodes } from '@/composables/nodePack/useMissingNodes' +import { useComfyManagerService } from '@/services/comfyManagerService' import { useDialogService } from '@/services/dialogService' -import { useAboutPanelStore } from '@/stores/aboutPanelStore' import type { MissingNodeType } from '@/types/comfy' import { ManagerTab } from '@/types/comfyManagerTypes' @@ -60,22 +58,11 @@ const props = defineProps<{ missingNodeTypes: MissingNodeType[] }>() -const aboutPanelStore = useAboutPanelStore() - // Get missing node packs from workflow with loading and error states const { missingNodePacks, isLoading, error, missingCoreNodes } = useMissingNodes() -// Determines if ComfyUI-Manager is installed by checking for its badge in the about panel -// This allows us to conditionally show the Manager button only when the extension is available -// TODO: Remove this check when Manager functionality is fully migrated into core -const isManagerInstalled = computed(() => { - return aboutPanelStore.badges.some( - (badge) => - badge.label.includes('ComfyUI-Manager') || - badge.url.includes('ComfyUI-Manager') - ) -}) +const isLegacyManager = ref(false) const uniqueNodes = computed(() => { const seenTypes = new Set() @@ -103,6 +90,13 @@ const openManager = () => { initialTab: ManagerTab.Missing }) } + +onMounted(async () => { + const isLegacyResponse = await useComfyManagerService().isLegacyManagerUI() + if (isLegacyResponse?.is_legacy_manager_ui) { + isLegacyManager.value = true + } +})