feat(workspace): replace supported platform count with bound media account count
The "platforms" stat tile was a constant (5) that never reflected what the tenant actually had set up. Drop SupportedPlatformCount from the workspace overview API/domain/shared-types and have admin-web compute a bound media account count from the desktop accounts list, filtered through a new isMediaPublishAccount helper that excludes deleted rows and AI-only platforms (yuanbao/kimi/wenxin/deepseek/doubao/qwen). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@ import { useI18n } from "vue-i18n";
|
||||
import { mediaApi, resolveApiURL, tenantAccountsApi } from "@/lib/api";
|
||||
import { resolveAccountCheckedAt, resolveAccountHealth } from "@/lib/desktop-account-runtime";
|
||||
import { formatDateTime } from "@/lib/display";
|
||||
import { getPublishPlatformMeta, isPublishPlatformId, normalizePublishPlatformId } from "@/lib/publish-platforms";
|
||||
import { getPublishPlatformMeta, isMediaPublishAccount, normalizePublishPlatformId } from "@/lib/publish-platforms";
|
||||
|
||||
type AccountHealthFilter = "all" | "live" | "captcha" | "risk" | "expired";
|
||||
type PublishState = "immediate" | "queued" | "unavailable";
|
||||
@@ -79,8 +79,7 @@ const platformMap = computed(() => {
|
||||
|
||||
const mediaAccounts = computed<MediaAccountCard[]>(() => {
|
||||
return [...(accountsQuery.data.value ?? [])]
|
||||
.filter((account) => !account.deleted_at)
|
||||
.filter((account) => isPublishPlatformId(account.platform))
|
||||
.filter(isMediaPublishAccount)
|
||||
.map((account) => {
|
||||
const platformId = normalizePublishPlatformId(account.platform);
|
||||
const platform = platformMap.value.get(platformId);
|
||||
|
||||
Reference in New Issue
Block a user