fix(desktop): align AI platform sidebar badge with media-account semantics
The AI 平台 badge counted distinct platforms with at least one active-auth account, while 媒体账号 counted raw account rows regardless of auth state. The two numbers shared a slot but meant different things, which made them not comparable at a glance. Switch the AI 平台 count to mirror 媒体账号: account-level count of accounts whose platform falls in the monitoring catalog, with no authState filter. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,9 +30,7 @@ const navItems = computed(() => {
|
||||
const data = snapshot.value
|
||||
const accounts = data?.accounts ?? []
|
||||
const publishIDs = new Set(desktopPublishMediaCatalog.map((item) => item.id))
|
||||
const authorizedMonitoringCount = desktopMonitoringMediaCatalog.filter((platform) =>
|
||||
accounts.find((account) => account.platform === platform.id)?.authState === 'active',
|
||||
).length
|
||||
const monitoringIDs = new Set(desktopMonitoringMediaCatalog.map((item) => item.id))
|
||||
|
||||
return [
|
||||
{
|
||||
@@ -60,7 +58,7 @@ const navItems = computed(() => {
|
||||
to: '/ai-platforms',
|
||||
title: 'AI 平台',
|
||||
description: 'AI 平台一平台一授权,按卡片查看状态与归属',
|
||||
count: authorizedMonitoringCount,
|
||||
count: accounts.filter((item) => monitoringIDs.has(item.platform)).length,
|
||||
icon: RobotOutlined,
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user