1
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -28,7 +28,7 @@
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<script type="module" crossorigin src="/assets/index-By9oW19d.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-kmFIWx83.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-D7ShJUt4.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
Typography,
|
||||
} from 'antd';
|
||||
import {
|
||||
AudioOutlined,
|
||||
CheckCircleOutlined,
|
||||
ClockCircleOutlined,
|
||||
CloseCircleOutlined,
|
||||
@@ -436,31 +437,35 @@ const AdminGenerationAiRecords: React.FC = () => {
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '附件', key: 'references', width: 130,
|
||||
title: '附件', key: 'references', width: 100,
|
||||
render: (_: any, r: GenerationAITaskOut) => {
|
||||
const refs = r.mediaReferences || [];
|
||||
if (refs.length === 0) return <Typography.Text style={{ fontSize: 12, color: '#94a3b8' }}>无</Typography.Text>;
|
||||
return (
|
||||
<Space size={4} wrap>
|
||||
<Space size={2} wrap>
|
||||
{refs.map((ref, idx) => {
|
||||
const refUrl = getReferenceUrl(ref);
|
||||
const refType = getReferenceType(ref);
|
||||
const title = typeof ref.name === 'string' && ref.name ? ref.name : `附件 ${idx + 1}`;
|
||||
if (!refUrl) return null;
|
||||
const icon = refType === 'video'
|
||||
? <VideoCameraOutlined style={{ color: '#6366f1' }} />
|
||||
: refType === 'audio'
|
||||
? <AudioOutlined style={{ color: '#f59e0b' }} />
|
||||
: <FileImageOutlined style={{ color: '#8b5cf6' }} />;
|
||||
return (
|
||||
<Button
|
||||
key={idx}
|
||||
size="small"
|
||||
icon={refType === 'video' ? <PlayCircleOutlined /> : <FileImageOutlined />}
|
||||
type="link"
|
||||
style={{ padding: 0, fontSize: 12 }}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
handlePreviewResource(refUrl, refType === 'video' ? 'video' : 'image', title);
|
||||
}}
|
||||
>
|
||||
{title}
|
||||
</Button>
|
||||
<Tooltip key={idx} title={title}>
|
||||
<Button
|
||||
size="small"
|
||||
type="text"
|
||||
icon={icon}
|
||||
style={{ width: 28, height: 28, padding: 0 }}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
handlePreviewResource(refUrl, refType === 'video' ? 'video' : 'image', title);
|
||||
}}
|
||||
/>
|
||||
</Tooltip>
|
||||
);
|
||||
})}
|
||||
</Space>
|
||||
|
||||
Reference in New Issue
Block a user