From a03eb9ed0a47c7fc2d9666d7922bd3cefce72a92 Mon Sep 17 00:00:00 2001 From: ddCat <2695092045@qq.com> Date: Tue, 4 Aug 2026 21:23:16 +0800 Subject: [PATCH] =?UTF-8?q?refactor(platform):=20=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8C=BA=20-=20=E6=94=B6=E7=B4=A7=E7=B4=A0?= =?UTF-8?q?=E6=9D=90=E5=8D=A1=E7=89=87=E4=B8=8E=E5=88=86=E9=A1=B5=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E5=B9=B6=E7=BB=9F=E4=B8=80=E8=AE=BE=E7=BD=AE=E9=A1=B5?= =?UTF-8?q?=E8=A1=A8=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/layout/workspace-page.tsx | 5 +- web/src/pages/assets/index.tsx | 63 ++++++++------------ web/src/pages/home/index.tsx | 2 +- web/src/pages/settings/index.tsx | 8 +-- web/src/pages/wallet/index.tsx | 2 +- web/src/styles/globals.css | 17 ++++-- 6 files changed, 45 insertions(+), 52 deletions(-) diff --git a/web/src/components/layout/workspace-page.tsx b/web/src/components/layout/workspace-page.tsx index 91633170f..5f5219cfc 100644 --- a/web/src/components/layout/workspace-page.tsx +++ b/web/src/components/layout/workspace-page.tsx @@ -7,7 +7,7 @@ import { cn } from "@/lib/utils"; export function WorkspacePage({ children, className, grid = false, fluid = false }: { children: ReactNode; className?: string; grid?: boolean; fluid?: boolean }) { return ( -
+
{children}
); @@ -54,8 +54,9 @@ export function CollectionGrid({ children, className }: { children: ReactNode; c export function PaginationBar({ current, pageSize, total, onChange, pageSizeOptions = [20, 50, 100] }: { current: number; pageSize: number; total: number; onChange: (page: number, pageSize: number) => void; pageSizeOptions?: number[] }) { if (total <= pageSize && current === 1) return null; return ( -
+
} onClick={() => setBatchDeleteOpen(true)}>删除
) : null} - + {visibleAssets.map((asset) => ( setSelectedIds((current) => selected ? [...new Set([...current, asset.id])] : current.filter((id) => id !== asset.id))} onOpen={() => setPreviewAsset(asset)} onEdit={() => openEdit(asset)} onCopy={copyAssetText} onDownload={downloadImage} onDelete={() => setDeletingAsset(asset)} /> ))} @@ -427,43 +427,12 @@ export default function AssetsPage() { function AssetCard({ asset, selected, onSelect, onOpen, onEdit, onCopy, onDownload, onDelete }: { asset: LibraryAsset; selected: boolean; onSelect: (selected: boolean) => void; onOpen: () => void; onEdit: () => void; onCopy: (asset: LibraryAsset) => void; onDownload: (asset: LibraryAsset) => void; onDelete: () => void }) { const summary = assetSummary(asset); return ( -
-
-
} /> +
+
+
} /> - event.stopPropagation()} onChange={(event) => onSelect(event.target.checked)} className={`absolute left-2 top-2 size-4 accent-[var(--workspace-accent)] ${selected ? "opacity-100" : "opacity-100 sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"}`} aria-label={`选择 ${asset.title}`} /> -
- -
- + event.stopPropagation()} onChange={(event) => onSelect(event.target.checked)} className={`absolute left-2 top-2 size-4 accent-[var(--workspace-accent)] drop-shadow-md transition-opacity ${selected ? "opacity-100" : "opacity-100 sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"}`} aria-label={`选择 ${asset.title}`} /> , label: "删除", onClick: onDelete }, ] }} > - +
+ {assetKindLabel(asset.kind)} + {assetCategoryLabel(asset.category)} +
+ ); } diff --git a/web/src/pages/home/index.tsx b/web/src/pages/home/index.tsx index 20153d37a..51dd31b33 100644 --- a/web/src/pages/home/index.tsx +++ b/web/src/pages/home/index.tsx @@ -58,7 +58,7 @@ export default function IndexPage() { const loadingUserWorkspace = !userHydrated || (Boolean(user && shortDramaEnabled) && domainProjectsQuery.isLoading); return ( -
+
{loadingUserWorkspace ? ( diff --git a/web/src/pages/settings/index.tsx b/web/src/pages/settings/index.tsx index c3abcd2dd..e2be1523d 100644 --- a/web/src/pages/settings/index.tsx +++ b/web/src/pages/settings/index.tsx @@ -253,7 +253,7 @@ export default function SettingsPage() { }; return ( -
+
{shouldPromptContinue ? ( @@ -268,7 +268,7 @@ export default function SettingsPage() { {shouldPromptContinue ? : null}
-