feat(frontend): 对齐工件文件列表 UI 渲染
This commit is contained in:
parent
929260bdb8
commit
e8b145bff3
|
|
@ -18,7 +18,7 @@ import {
|
||||||
getFileIcon,
|
getFileIcon,
|
||||||
getFileName,
|
getFileName,
|
||||||
} from "@/core/utils/files";
|
} from "@/core/utils/files";
|
||||||
import { cn, truncateMiddle } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
import { useArtifacts } from "./context";
|
import { useArtifacts } from "./context";
|
||||||
|
|
||||||
|
|
@ -80,14 +80,12 @@ export function ArtifactFileList({
|
||||||
onClick={() => handleClick(file)}
|
onClick={() => handleClick(file)}
|
||||||
>
|
>
|
||||||
<CardHeader className="pr-2 pl-1">
|
<CardHeader className="pr-2 pl-1">
|
||||||
<CardTitle className=" relative pl-8 overflow-hidden">
|
<CardTitle className="relative pl-8">
|
||||||
<div className=" text-ellipsis whitespace-nowrap text-sm font-normal" title={getFileName(file)}>
|
<div>{getFileName(file)}</div>
|
||||||
{truncateMiddle(getFileName(file), 50)}
|
<div className="absolute top-2 -left-0.5">
|
||||||
|
{getFileIcon(file, "size-6")}
|
||||||
</div>
|
</div>
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<div className="absolute top-5 left-3">
|
|
||||||
{getFileIcon(file, "size-6 stroke-[1.5px] stroke-[#333333]")}
|
|
||||||
</div>
|
|
||||||
<CardDescription className="pl-8 text-xs">
|
<CardDescription className="pl-8 text-xs">
|
||||||
{getFileExtensionDisplayName(file)} file
|
{getFileExtensionDisplayName(file)} file
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue