/** 后台展示用站点名:优先中文名,不暴露内部 code。 */ export function formatAdminSiteLabel( name?: string | null, code?: string | null, ): string { const trimmedName = name?.trim(); if (trimmedName) { return trimmedName; } const trimmedCode = code?.trim(); return trimmedCode ?? "—"; }