fix(accounts): hide AI-platform accounts from publish-only views
After splitting AI platforms into their own catalog, the admin MediaView and desktop AccountsView still showed yuanbao/kimi/wenxin/deepseek/doubao/qwen rows alongside publish platforms. Filter by publish catalog membership so those views stay scoped to publish accounts only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -22,8 +22,11 @@ const actionSuccess = ref<string | null>(null);
|
||||
|
||||
type AccountAuthState = "authorized" | "expired" | "attention" | "risk";
|
||||
type AccountRow = Readonly<Omit<RuntimeAccount, "tags">> & { tags: readonly string[] };
|
||||
const publishPlatformIds = new Set(desktopPublishMediaCatalog.map((item) => item.id));
|
||||
|
||||
const accounts = computed(() => snapshot.value?.accounts ?? []);
|
||||
const accounts = computed(() =>
|
||||
(snapshot.value?.accounts ?? []).filter((account) => publishPlatformIds.has(account.platform)),
|
||||
);
|
||||
|
||||
const overview = computed(() => ({
|
||||
authorized: accounts.value.filter((item) => item.health === "live").length,
|
||||
|
||||
Reference in New Issue
Block a user