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:
@@ -25,6 +25,11 @@ const platformCatalog: Record<string, Omit<PublishPlatformOption, "accountLabel"
|
||||
dongchedi: { id: "dongchedi", name: "懂车帝", shortName: "懂", accent: "#fadb14" },
|
||||
};
|
||||
|
||||
export function isPublishPlatformId(platformId?: string | null): boolean {
|
||||
const normalized = normalizePublishPlatformId(platformId);
|
||||
return Boolean(normalized) && normalized in platformCatalog;
|
||||
}
|
||||
|
||||
export function getPublishPlatformMeta(platformId: string): Omit<PublishPlatformOption, "accountLabel" | "bound"> {
|
||||
const normalized = normalizePublishPlatformId(platformId);
|
||||
const fallbackShortName = normalized.slice(0, 1).toUpperCase() || "?";
|
||||
|
||||
Reference in New Issue
Block a user