From d2eaffe914ba0e298ffd19d0a1efb156c51f1398 Mon Sep 17 00:00:00 2001 From: bymyself Date: Sun, 31 Aug 2025 19:43:28 -0700 Subject: [PATCH] [fix] Fix manager button visibility when manager is disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use managerStateStore instead of legacy isLegacyManager check - Initialize manager state on component mount to detect --disable-manager - Hide Install All Missing Custom Nodes button when manager is disabled - Fixes issue where buttons showed even when comfyui_manager package not installed 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../dialog/content/LoadWorkflowWarning.vue | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/dialog/content/LoadWorkflowWarning.vue b/src/components/dialog/content/LoadWorkflowWarning.vue index 43ab5cb60..ea35130e8 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, onMounted, ref } from 'vue' +import { computed, onMounted } from 'vue' import { useI18n } from 'vue-i18n' import NoResultsPlaceholder from '@/components/common/NoResultsPlaceholder.vue' import MissingCoreNodesMessage from '@/components/dialog/content/MissingCoreNodesMessage.vue' import { useMissingNodes } from '@/composables/nodePack/useMissingNodes' -import { useComfyManagerService } from '@/services/comfyManagerService' import { useDialogService } from '@/services/dialogService' import { useComfyManagerStore } from '@/stores/comfyManagerStore' import { useCommandStore } from '@/stores/commandStore' @@ -79,7 +78,6 @@ const { missingNodePacks, isLoading, error, missingCoreNodes } = useMissingNodes() const comfyManagerStore = useComfyManagerStore() -const isLegacyManager = ref(false) // Check if any of the missing packs are currently being installed const isInstalling = computed(() => { @@ -112,6 +110,11 @@ const uniqueNodes = computed(() => { const managerStateStore = useManagerStateStore() +// Show manager buttons unless manager is disabled +const showManagerButtons = computed(() => { + return managerStateStore.managerUIState !== ManagerUIState.DISABLED +}) + const openManager = async () => { const state = managerStateStore.managerUIState @@ -144,10 +147,8 @@ const openManager = async () => { } onMounted(async () => { - const isLegacyResponse = await useComfyManagerService().isLegacyManagerUI() - if (isLegacyResponse?.is_legacy_manager_ui) { - isLegacyManager.value = true - } + // Initialize manager state to determine if manager is disabled + await managerStateStore.initializeManagerState() })