mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-25 08:49:36 +00:00
dont show missing nodes button in legacy manager mode
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
<div v-if="isManagerInstalled" class="flex justify-end py-3">
|
<div v-if="!isLegacyManager" class="flex justify-end py-3">
|
||||||
<PackInstallButton
|
<PackInstallButton
|
||||||
:disabled="isLoading || !!error || missingNodePacks.length === 0"
|
:disabled="isLoading || !!error || missingNodePacks.length === 0"
|
||||||
:node-packs="missingNodePacks"
|
:node-packs="missingNodePacks"
|
||||||
@@ -45,14 +45,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 } from 'vue'
|
import { computed, onMounted, ref } from 'vue'
|
||||||
|
|
||||||
import NoResultsPlaceholder from '@/components/common/NoResultsPlaceholder.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 { useMissingNodes } from '@/composables/nodePack/useMissingNodes'
|
||||||
|
import { useComfyManagerService } from '@/services/comfyManagerService'
|
||||||
import { useDialogService } from '@/services/dialogService'
|
import { useDialogService } from '@/services/dialogService'
|
||||||
import { useAboutPanelStore } from '@/stores/aboutPanelStore'
|
|
||||||
import type { MissingNodeType } from '@/types/comfy'
|
import type { MissingNodeType } from '@/types/comfy'
|
||||||
import { ManagerTab } from '@/types/comfyManagerTypes'
|
import { ManagerTab } from '@/types/comfyManagerTypes'
|
||||||
|
|
||||||
@@ -60,22 +58,11 @@ const props = defineProps<{
|
|||||||
missingNodeTypes: MissingNodeType[]
|
missingNodeTypes: MissingNodeType[]
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const aboutPanelStore = useAboutPanelStore()
|
|
||||||
|
|
||||||
// Get missing node packs from workflow with loading and error states
|
// Get missing node packs from workflow with loading and error states
|
||||||
const { missingNodePacks, isLoading, error, missingCoreNodes } =
|
const { missingNodePacks, isLoading, error, missingCoreNodes } =
|
||||||
useMissingNodes()
|
useMissingNodes()
|
||||||
|
|
||||||
// Determines if ComfyUI-Manager is installed by checking for its badge in the about panel
|
const isLegacyManager = ref(false)
|
||||||
// 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 uniqueNodes = computed(() => {
|
const uniqueNodes = computed(() => {
|
||||||
const seenTypes = new Set()
|
const seenTypes = new Set()
|
||||||
@@ -103,6 +90,13 @@ const openManager = () => {
|
|||||||
initialTab: ManagerTab.Missing
|
initialTab: ManagerTab.Missing
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
const isLegacyResponse = await useComfyManagerService().isLegacyManagerUI()
|
||||||
|
if (isLegacyResponse?.is_legacy_manager_ui) {
|
||||||
|
isLegacyManager.value = true
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user