import { PlatformReportDialog } from '../common/PlatformReportDialog'; export type PlatformErrorDialogPayload = { source: string; message: string; }; type PlatformErrorDialogProps = { error: PlatformErrorDialogPayload | null; onClose: () => void; overlayClassName?: string; panelClassName?: string; }; function isBlacklistedPlatformError(error: PlatformErrorDialogPayload | null) { // 中文注释:入口关闭是平台开关状态,不作为全局错误弹窗打扰用户。 return Boolean(error?.message.includes('creation_entry_disabled')); } export function PlatformErrorDialog({ error, onClose, overlayClassName = 'platform-theme platform-theme--light !items-center', panelClassName = 'platform-remap-surface rounded-[1.5rem]', }: PlatformErrorDialogProps) { const dialogError = isBlacklistedPlatformError(error) ? null : error; return ( ); }