mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 15:40:10 +00:00
[feat] Show conflicting status for installed packages with compatibility issues (#4579)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -32,8 +32,9 @@ type StatusProps = {
|
||||
severity: MessageSeverity
|
||||
}
|
||||
|
||||
const { statusType } = defineProps<{
|
||||
const { statusType, hasCompatibilityIssues } = defineProps<{
|
||||
statusType: Status
|
||||
hasCompatibilityIssues?: boolean
|
||||
}>()
|
||||
|
||||
const statusPropsMap: Record<Status, StatusProps> = {
|
||||
@@ -71,10 +72,14 @@ const statusPropsMap: Record<Status, StatusProps> = {
|
||||
}
|
||||
}
|
||||
|
||||
const statusLabel = computed(
|
||||
() => statusPropsMap[statusType]?.label || 'unknown'
|
||||
const statusLabel = computed(() =>
|
||||
hasCompatibilityIssues
|
||||
? 'conflicting'
|
||||
: statusPropsMap[statusType]?.label || 'unknown'
|
||||
)
|
||||
const statusSeverity = computed(
|
||||
() => statusPropsMap[statusType]?.severity || 'secondary'
|
||||
const statusSeverity = computed(() =>
|
||||
hasCompatibilityIssues
|
||||
? 'error'
|
||||
: statusPropsMap[statusType]?.severity || 'secondary'
|
||||
)
|
||||
</script>
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
:status-type="
|
||||
nodePack.status as components['schemas']['NodeVersionStatus']
|
||||
"
|
||||
:has-compatibility-issues="hasCompatibilityIssues"
|
||||
/>
|
||||
</MetadataRow>
|
||||
<MetadataRow :label="t('manager.version')">
|
||||
@@ -131,9 +132,9 @@ const conflictResult = computed((): ConflictDetectionResult | null => {
|
||||
return null
|
||||
})
|
||||
|
||||
const hasCompatibilityIssues = computed(
|
||||
() => conflictResult.value?.has_conflict ?? false
|
||||
)
|
||||
const hasCompatibilityIssues = computed(() => {
|
||||
return isInstalled.value && conflictResult.value?.has_conflict ? true : false
|
||||
})
|
||||
|
||||
const infoItems = computed<InfoItem[]>(() => [
|
||||
{
|
||||
|
||||
@@ -190,7 +190,8 @@
|
||||
"flagged": "Flagged",
|
||||
"deleted": "Deleted",
|
||||
"banned": "Banned",
|
||||
"unknown": "Unknown"
|
||||
"unknown": "Unknown",
|
||||
"conflicting": "Conflicting"
|
||||
},
|
||||
"sort": {
|
||||
"downloads": "Most Popular",
|
||||
|
||||
Reference in New Issue
Block a user