mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 10:42:44 +00:00
[fix] Fix manager button visibility when manager is disabled
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
<div v-if="!isLegacyManager" class="flex justify-end py-3">
|
<div v-if="showManagerButtons" class="flex justify-end py-3">
|
||||||
<PackInstallButton
|
<PackInstallButton
|
||||||
:disabled="
|
:disabled="
|
||||||
isLoading || !!error || missingNodePacks.length === 0 || isInstalling
|
isLoading || !!error || missingNodePacks.length === 0 || isInstalling
|
||||||
@@ -50,13 +50,12 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Button from 'primevue/button'
|
import Button from 'primevue/button'
|
||||||
import ListBox from 'primevue/listbox'
|
import ListBox from 'primevue/listbox'
|
||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
import NoResultsPlaceholder from '@/components/common/NoResultsPlaceholder.vue'
|
import NoResultsPlaceholder from '@/components/common/NoResultsPlaceholder.vue'
|
||||||
import MissingCoreNodesMessage from '@/components/dialog/content/MissingCoreNodesMessage.vue'
|
import MissingCoreNodesMessage from '@/components/dialog/content/MissingCoreNodesMessage.vue'
|
||||||
import { useMissingNodes } from '@/composables/nodePack/useMissingNodes'
|
import { useMissingNodes } from '@/composables/nodePack/useMissingNodes'
|
||||||
import { useComfyManagerService } from '@/services/comfyManagerService'
|
|
||||||
import { useDialogService } from '@/services/dialogService'
|
import { useDialogService } from '@/services/dialogService'
|
||||||
import { useComfyManagerStore } from '@/stores/comfyManagerStore'
|
import { useComfyManagerStore } from '@/stores/comfyManagerStore'
|
||||||
import { useCommandStore } from '@/stores/commandStore'
|
import { useCommandStore } from '@/stores/commandStore'
|
||||||
@@ -79,7 +78,6 @@ const { missingNodePacks, isLoading, error, missingCoreNodes } =
|
|||||||
useMissingNodes()
|
useMissingNodes()
|
||||||
|
|
||||||
const comfyManagerStore = useComfyManagerStore()
|
const comfyManagerStore = useComfyManagerStore()
|
||||||
const isLegacyManager = ref(false)
|
|
||||||
|
|
||||||
// Check if any of the missing packs are currently being installed
|
// Check if any of the missing packs are currently being installed
|
||||||
const isInstalling = computed(() => {
|
const isInstalling = computed(() => {
|
||||||
@@ -112,6 +110,11 @@ const uniqueNodes = computed(() => {
|
|||||||
|
|
||||||
const managerStateStore = useManagerStateStore()
|
const managerStateStore = useManagerStateStore()
|
||||||
|
|
||||||
|
// Show manager buttons unless manager is disabled
|
||||||
|
const showManagerButtons = computed(() => {
|
||||||
|
return managerStateStore.managerUIState !== ManagerUIState.DISABLED
|
||||||
|
})
|
||||||
|
|
||||||
const openManager = async () => {
|
const openManager = async () => {
|
||||||
const state = managerStateStore.managerUIState
|
const state = managerStateStore.managerUIState
|
||||||
|
|
||||||
@@ -144,10 +147,8 @@ const openManager = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
const isLegacyResponse = await useComfyManagerService().isLegacyManagerUI()
|
// Initialize manager state to determine if manager is disabled
|
||||||
if (isLegacyResponse?.is_legacy_manager_ui) {
|
await managerStateStore.initializeManagerState()
|
||||||
isLegacyManager.value = true
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user