From 956bc705d79633c81aa6b44ba649802d8419ad7d Mon Sep 17 00:00:00 2001 From: Jin Yi Date: Tue, 29 Jul 2025 17:31:57 +0900 Subject: [PATCH] [feat] Show conflicting status for installed packages with compatibility issues (#4579) Co-authored-by: Claude --- .../dialog/content/manager/PackStatusMessage.vue | 15 ++++++++++----- .../content/manager/infoPanel/InfoPanel.vue | 7 ++++--- src/locales/en/main.json | 3 ++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/components/dialog/content/manager/PackStatusMessage.vue b/src/components/dialog/content/manager/PackStatusMessage.vue index b31f880e9..0e33b3117 100644 --- a/src/components/dialog/content/manager/PackStatusMessage.vue +++ b/src/components/dialog/content/manager/PackStatusMessage.vue @@ -32,8 +32,9 @@ type StatusProps = { severity: MessageSeverity } -const { statusType } = defineProps<{ +const { statusType, hasCompatibilityIssues } = defineProps<{ statusType: Status + hasCompatibilityIssues?: boolean }>() const statusPropsMap: Record = { @@ -71,10 +72,14 @@ const statusPropsMap: Record = { } } -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' ) diff --git a/src/components/dialog/content/manager/infoPanel/InfoPanel.vue b/src/components/dialog/content/manager/infoPanel/InfoPanel.vue index 818721310..6919ac904 100644 --- a/src/components/dialog/content/manager/infoPanel/InfoPanel.vue +++ b/src/components/dialog/content/manager/infoPanel/InfoPanel.vue @@ -32,6 +32,7 @@ :status-type=" nodePack.status as components['schemas']['NodeVersionStatus'] " + :has-compatibility-issues="hasCompatibilityIssues" /> @@ -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(() => [ { diff --git a/src/locales/en/main.json b/src/locales/en/main.json index f92c64ae0..598705c6d 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -195,7 +195,8 @@ "flagged": "Flagged", "deleted": "Deleted", "banned": "Banned", - "unknown": "Unknown" + "unknown": "Unknown", + "conflicting": "Conflicting" }, "sort": { "downloads": "Most Popular",