improve layout

This commit is contained in:
2025-09-05 14:55:27 +08:00
parent 993e7f488d
commit a33171fb20
2 changed files with 13 additions and 4 deletions

View File

@@ -1,6 +1,10 @@
@import "tailwindcss"; @import "tailwindcss";
@plugin "daisyui"; @plugin "daisyui";
@theme {
--breakpoint-xs: 30rem;
}
/* Pink Theme */ /* Pink Theme */
@plugin "daisyui/theme" { @plugin "daisyui/theme" {
name: "pink"; name: "pink";

View File

@@ -694,8 +694,8 @@ function FileTile({ file }: { file: RFile }) {
const navigate = useNavigate(); const navigate = useNavigate();
return ( return (
<div className={"card shadow bg-base-100 mb-4"}> <div className={"card shadow bg-base-100 mb-4 p-4"}>
<div className={"p-4 flex flex-row items-center"}> <div className={"flex flex-row items-center"}>
<div className={"grow"}> <div className={"grow"}>
<h4 className={"font-bold break-all"}>{file.filename}</h4> <h4 className={"font-bold break-all"}>{file.filename}</h4>
<div className={"text-sm my-1 comment_tile"}> <div className={"text-sm my-1 comment_tile"}>
@@ -727,7 +727,7 @@ function FileTile({ file }: { file: RFile }) {
{file.is_redirect ? t("Redirect") : fileSizeToString(file.size)} {file.is_redirect ? t("Redirect") : fileSizeToString(file.size)}
</Badge> </Badge>
{ {
file.hash && <Badge className={"badge-soft badge-accent text-xs mr-2"} selectable={true}> file.hash && <Badge className={"badge-soft badge-accent text-xs mr-2 break-all hidden sm:inline-flex"} selectable={true}>
<MdOutlineVerifiedUser size={16} className={"inline-block"} /> <MdOutlineVerifiedUser size={16} className={"inline-block"} />
Md5: {file.hash} Md5: {file.hash}
</Badge> </Badge>
@@ -736,7 +736,7 @@ function FileTile({ file }: { file: RFile }) {
<UpdateFileInfoDialog file={file} /> <UpdateFileInfoDialog file={file} />
</p> </p>
</div> </div>
<div className={"flex flex-row items-center"}> <div className={`flex-row items-center hidden xs:flex`}>
{file.size > 10 * 1024 * 1024 ? ( {file.size > 10 * 1024 * 1024 ? (
<button <button
ref={buttonRef} ref={buttonRef}
@@ -766,6 +766,11 @@ function FileTile({ file }: { file: RFile }) {
)} )}
</div> </div>
</div> </div>
<div className="flex flex-row-reverse xs:hidden p-2">
<button className={"btn btn-primary btn-soft btn-sm"}>
<MdOutlineDownload size={20} />
</button>
</div>
</div> </div>
); );
} }