Display created time of files.

This commit is contained in:
2025-10-04 21:10:47 +08:00
parent ff30125518
commit af52e7b764
3 changed files with 8 additions and 1 deletions

View File

@@ -106,6 +106,7 @@ export interface RFile {
resource?: Resource;
hash?: string;
storage_name?: string;
created_at: number; // unix timestamp
}
export interface UploadingFile {

View File

@@ -25,7 +25,7 @@ import Markdown from "react-markdown";
import "../markdown.css";
import Loading from "../components/loading.tsx";
import {
MdAdd,
MdAdd, MdOutlineAccessTime,
MdOutlineAdd,
MdOutlineArchive,
MdOutlineArticle,
@@ -776,6 +776,10 @@ function FileTile({ file }: { file: RFile }) {
{file.storage_name}
</Badge>
)}
<Badge className={"badge-soft badge-info text-xs mr-2"}>
<MdOutlineAccessTime size={16} className={"inline-block"} />
{new Date(file.created_at).toISOString().substring(0, 10)}
</Badge>
<DeleteFileDialog fileId={file.id} uploaderId={file.user.id} />
<UpdateFileInfoDialog file={file} />
</p>