From ca33d4353f6b88264ff1716ad131e16d4ebc87be Mon Sep 17 00:00:00 2001 From: goddonebianu Date: Sun, 8 Mar 2026 13:05:48 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9=E5=88=97=E8=A1=A8=20UI=20=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=92=8C=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/folders/FoldersClient.tsx | 46 +++++++++++++++---------------- src/components/ui/CardList.tsx | 2 +- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/src/app/folders/FoldersClient.tsx b/src/app/folders/FoldersClient.tsx index 5d91837..3df6c74 100644 --- a/src/app/folders/FoldersClient.tsx +++ b/src/app/folders/FoldersClient.tsx @@ -29,19 +29,19 @@ const FolderCard = ({ folder, refresh }: FolderProps) => { return (
{ router.push(`/folders/${folder.id}`); }} > -
-
- +
+
+
-
-

{folder.name}

-

+

+

{folder.name}

+

{t("folderInfo", { id: folder.id, name: folder.name, @@ -51,7 +51,7 @@ const FolderCard = ({ folder, refresh }: FolderProps) => {

-
+
{ e.stopPropagation(); @@ -69,7 +69,7 @@ const FolderCard = ({ folder, refresh }: FolderProps) => { } }} > - + { @@ -89,9 +89,9 @@ const FolderCard = ({ folder, refresh }: FolderProps) => { }} className="text-gray-400 hover:text-red-500 hover:bg-red-50" > - + - +
); @@ -156,7 +156,7 @@ export function FoldersClient({ userId }: { userId: string; }) { disabled={loading} className="w-full border-dashed" > - + {loading ? t("creating") : t("newFolder")} @@ -167,23 +167,21 @@ export function FoldersClient({ userId }: { userId: string; }) { // 空状态
- +

{t("noFoldersYet")}

) : ( // 文件夹卡片列表 -
- {folders - .toSorted((a, b) => a.id - b.id) - .map((folder) => ( - - ))} -
+ folders + .toSorted((a, b) => a.id - b.id) + .map((folder) => ( + + )) )}
diff --git a/src/components/ui/CardList.tsx b/src/components/ui/CardList.tsx index 94b0e04..15b770f 100644 --- a/src/components/ui/CardList.tsx +++ b/src/components/ui/CardList.tsx @@ -13,7 +13,7 @@ interface CardListProps { export function CardList({ children, className = "" }: CardListProps) { return (
- + {children}