Shorten node source package name by remove ComfyUI prefix/suffix (#883)

* Shorten node source package name by remove ComfyUI prefix/suffix

* Update test expectations [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2024-09-19 12:40:05 +09:00
committed by GitHub
parent 29d69338ef
commit b6dbe8f07b
10 changed files with 54 additions and 52 deletions

View File

@@ -1,29 +0,0 @@
<template>
<Chip :class="nodeSource.className">
{{ nodeSource.displayText }}
</Chip>
</template>
<script setup lang="ts">
import { getNodeSource } from '@/types/nodeSource'
import Chip from 'primevue/chip'
import { computed } from 'vue'
const props = defineProps({
python_module: {
type: String,
required: true
}
})
const nodeSource = computed(() => getNodeSource(props.python_module))
</script>
<style scoped>
.comfy-core,
.comfy-custom-nodes,
.comfy-unknown {
font-size: small;
font-weight: lighter;
}
</style>

View File

@@ -38,17 +38,20 @@
:value="formatNumberWithSuffix(nodeFrequency, { roundToInt: true })"
severity="secondary"
/>
<NodeSourceChip
v-if="nodeDef.python_module !== undefined"
:python_module="nodeDef.python_module"
/>
<Chip
v-if="nodeDef.nodeSource.type !== NodeSourceType.Unknown"
class="text-sm font-light"
>
{{ nodeDef.nodeSource.displayText }}
</Chip>
</div>
</div>
</template>
<script setup lang="ts">
import Tag from 'primevue/tag'
import NodeSourceChip from '@/components/node/NodeSourceChip.vue'
import Chip from 'primevue/chip'
import { NodeSourceType } from '@/types/nodeSource'
import { ComfyNodeDefImpl, useNodeFrequencyStore } from '@/stores/nodeDefStore'
import { highlightQuery } from '@/utils/formatUtil'
import { computed } from 'vue'