Skip to content

Commit 4304b3c

Browse files
committed
feat: add timestamp to AI generated files
1 parent 987bd92 commit 4304b3c

4 files changed

Lines changed: 91 additions & 223 deletions

File tree

src/components/User/Dashboard/DatasetOrganizer/FileTree.tsx

Lines changed: 75 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,37 @@ const FileTree: React.FC<FileTreeProps> = ({
180180
const renderFileIcon = (file: FileItem) => {
181181
// AI generated files — use AutoAwesome icon with purple color
182182
if (file.source === "ai") {
183-
return <AutoAwesome sx={{ color: Colors.purple, fontSize: 20 }} />;
183+
return (
184+
<>
185+
{file.source === "ai" && (
186+
<Box
187+
sx={{
188+
display: "inline-flex",
189+
alignItems: "center",
190+
px: 0.5,
191+
py: 0.1,
192+
ml: 0.5,
193+
borderRadius: 0.5,
194+
backgroundColor: "rgba(88, 101, 242, 0.1)",
195+
border: `1px solid ${Colors.purple}`,
196+
}}
197+
>
198+
<AutoAwesome sx={{ color: Colors.purple, fontSize: 15 }} />
199+
<Typography
200+
sx={{
201+
fontSize: "0.7rem",
202+
color: Colors.purple,
203+
fontFamily: "Ubuntu",
204+
fontWeight: 600,
205+
lineHeight: 1.5,
206+
}}
207+
>
208+
AI
209+
</Typography>
210+
</Box>
211+
)}
212+
</>
213+
);
184214
}
185215
if (file.type === "folder" || file.type === "zip") {
186216
return <Folder sx={{ color: Colors.darkGreen, fontSize: 20 }} />;
@@ -272,6 +302,22 @@ const FileTree: React.FC<FileTreeProps> = ({
272302
{file.name}
273303
</Typography>
274304

305+
{/* Add timestamp for AI files */}
306+
{file.source === "ai" && file.generatedAt && (
307+
<Typography
308+
variant="caption"
309+
sx={{
310+
color: Colors.purple,
311+
fontSize: "0.7rem",
312+
opacity: 0.7,
313+
mr: 1,
314+
fontFamily: "Ubuntu",
315+
}}
316+
>
317+
{file.generatedAt}
318+
</Typography>
319+
)}
320+
275321
{/* Note Icon */}
276322
<IconButton
277323
size="small"
@@ -470,10 +516,6 @@ const FileTree: React.FC<FileTreeProps> = ({
470516
}}
471517
>
472518
<Box sx={{ display: "flex", flexWrap: "wrap", gap: 1.5 }}>
473-
<Box sx={{ display: "flex", alignItems: "center", gap: 0.5 }}>
474-
<AutoAwesome sx={{ fontSize: 10, color: Colors.purple }} />
475-
<Typography variant="caption">AI Generated</Typography>
476-
</Box>
477519
<Box sx={{ display: "flex", alignItems: "center", gap: 0.5 }}>
478520
<Box
479521
sx={{
@@ -540,6 +582,34 @@ const FileTree: React.FC<FileTreeProps> = ({
540582
/>
541583
<Typography variant="caption">User Meta</Typography>
542584
</Box>
585+
<Box sx={{ display: "flex", alignItems: "center", gap: 0.5 }}>
586+
<Box
587+
sx={{
588+
display: "inline-flex",
589+
alignItems: "center",
590+
px: 0.5,
591+
py: 0.1,
592+
ml: 0.5,
593+
borderRadius: 0.5,
594+
backgroundColor: "rgba(88, 101, 242, 0.1)",
595+
border: `1px solid ${Colors.purple}`,
596+
}}
597+
>
598+
<AutoAwesome sx={{ color: Colors.purple, fontSize: 15 }} />
599+
<Typography
600+
sx={{
601+
fontSize: "0.7rem",
602+
color: Colors.purple,
603+
fontFamily: "Ubuntu",
604+
fontWeight: 600,
605+
lineHeight: 1.5,
606+
}}
607+
>
608+
AI
609+
</Typography>
610+
</Box>
611+
<Typography variant="caption">AI Generated</Typography>
612+
</Box>
543613
</Box>
544614
</Box>
545615
</Paper>

0 commit comments

Comments
 (0)