feat(workbench): 新增收集箱页面 — 素材列表/详情分栏布局 + 新增/选中/删除 mock 交互
This commit is contained in:
32
src/web/features/inbox/components/MaterialContent.tsx
Normal file
32
src/web/features/inbox/components/MaterialContent.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import { Card, Descriptions, Empty, Typography } from "antd";
|
||||
|
||||
import type { Material } from "../types";
|
||||
|
||||
import { formatRelativeTime } from "../../../shared/utils/time";
|
||||
|
||||
interface MaterialContentProps {
|
||||
material: Material | null;
|
||||
}
|
||||
|
||||
export function MaterialContent({ material }: MaterialContentProps) {
|
||||
if (!material) {
|
||||
return (
|
||||
<div className="app-inbox-content">
|
||||
<Empty description="请在左侧选择素材" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="app-inbox-content">
|
||||
<Typography.Title level={4}>素材详情</Typography.Title>
|
||||
<Card>
|
||||
<Typography.Paragraph>{material.description}</Typography.Paragraph>
|
||||
<Descriptions column={1} size="small">
|
||||
<Descriptions.Item label="关联时间">{material.associatedDate}</Descriptions.Item>
|
||||
<Descriptions.Item label="创建时间">{formatRelativeTime(material.createdAt)}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user