新增 PlatformReportDialog 公共可复制报告弹窗组件 将 PlatformErrorDialog 与 PlatformTaskCompletionDialog 改为薄包装 同步更新 PlatformUiKit 收口文档与团队决策记录
47 lines
1.2 KiB
TypeScript
47 lines
1.2 KiB
TypeScript
import { PlatformReportDialog } from '../common/PlatformReportDialog';
|
|
|
|
export type PlatformTaskCompletionDialogPayload = {
|
|
source: string;
|
|
message: string;
|
|
};
|
|
|
|
type PlatformTaskCompletionDialogProps = {
|
|
completion: PlatformTaskCompletionDialogPayload | null;
|
|
onClose: () => void;
|
|
overlayClassName?: string;
|
|
panelClassName?: string;
|
|
};
|
|
|
|
export function PlatformTaskCompletionDialog({
|
|
completion,
|
|
onClose,
|
|
overlayClassName = 'platform-theme platform-theme--light !items-center',
|
|
panelClassName = 'platform-remap-surface rounded-[1.5rem]',
|
|
}: PlatformTaskCompletionDialogProps) {
|
|
return (
|
|
<PlatformReportDialog
|
|
open={Boolean(completion)}
|
|
title="生成完成"
|
|
onClose={onClose}
|
|
copyIdleLabel="复制内容"
|
|
fields={
|
|
completion
|
|
? [
|
|
{
|
|
label: '来源',
|
|
value: completion.source,
|
|
},
|
|
{
|
|
label: '状态',
|
|
value: completion.message,
|
|
multiline: true,
|
|
},
|
|
]
|
|
: []
|
|
}
|
|
overlayClassName={overlayClassName}
|
|
panelClassName={panelClassName}
|
|
/>
|
|
);
|
|
}
|