...
This commit is contained in:
@@ -119,6 +119,7 @@ export default function FoldersClient({ userId }: { userId: string }) {
|
||||
<PageLayout>
|
||||
<PageHeader title={t("title")} subtitle={t("subtitle")} />
|
||||
|
||||
{/* 新建文件夹按钮 */}
|
||||
<button
|
||||
onClick={async () => {
|
||||
const folderName = prompt(t("enterFolderName"));
|
||||
@@ -141,9 +142,11 @@ export default function FoldersClient({ userId }: { userId: string }) {
|
||||
<span>{loading ? t("creating") : t("newFolder")}</span>
|
||||
</button>
|
||||
|
||||
{/* 文件夹列表 */}
|
||||
<div className="mt-4">
|
||||
<CardList>
|
||||
{folders.length === 0 ? (
|
||||
// 空状态
|
||||
<div className="text-center py-12 text-gray-400">
|
||||
<div className="w-16 h-16 mx-auto mb-3 rounded-full bg-gray-100 flex items-center justify-center">
|
||||
<FolderPlus size={24} className="text-gray-400" />
|
||||
@@ -151,6 +154,7 @@ export default function FoldersClient({ userId }: { userId: string }) {
|
||||
<p className="text-sm">{t("noFoldersYet")}</p>
|
||||
</div>
|
||||
) : (
|
||||
// 文件夹卡片列表
|
||||
<div className="rounded-xl border border-gray-200 overflow-hidden">
|
||||
{folders
|
||||
.toSorted((a, b) => a.id - b.id)
|
||||
|
||||
Reference in New Issue
Block a user