From f16385834419c5167eea97d055bc44efa54cd7f7 Mon Sep 17 00:00:00 2001 From: lijunjie Date: Wed, 25 Nov 2026 10:44:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A9=BA=E9=97=B4=E6=B8=85=E7=90=86=E4=B8=89?= =?UTF-8?q?=E9=A1=B5=E7=AD=BE=E7=BB=9F=E4=B8=80=E6=89=AB=E6=8F=8F=E4=BA=A4?= =?UTF-8?q?=E4=BA=92=E8=AF=AD=E8=A8=80=EF=BC=9A=E5=A4=A7=E5=8F=B7=E4=B8=BB?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E9=92=89=E9=85=8D=E7=BD=AE=E6=A0=8F=E5=8F=B3?= =?UTF-8?q?=E4=BE=A7=EF=BC=8C=E6=96=87=E6=A1=88/=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=9C=BA=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 垃圾清理:embedded 下孤悬在配置栏上方的开始/重新扫描按钮移除,主按钮 并入配置栏右侧(与大文件/重复文件同一位置同一尺寸);扫描中按钮显示 扫描中…;空态文案改为指向右侧按钮,去掉空态里的重复入口 - 重复文件:主按钮文案 开始查找 → 开始扫描,升级为大号 + 扫描图标, 扫描过之后变 重新扫描(与另两页同一状态机) - 大文件:主按钮升级大号 + 图标并钉右;补上"还没有扫描过大文件"空态 (原先扫描前整页空白,与另两页语言不一致) - 新共享样式:.scan-cta(flex 钉右)+.config-items(配置项左侧换行区) +.space-config-spacer;三页配置栏同一骨架:配置项在左、一颗大主按钮在右 - demo 10 断言全过:三页 CTA 类名/尺寸/图标/文案一致、几何同高同右缘、 垃圾页点击真实触发两阶段扫描 --- src/pages/DuplicateFilesPage.tsx | 20 +++++-- src/pages/LargeFilesPage.tsx | 28 +++++++++- src/pages/SpacePage.tsx | 95 ++++++++++++++------------------ src/styles.css | 24 ++++++++ 4 files changed, 107 insertions(+), 60 deletions(-) diff --git a/src/pages/DuplicateFilesPage.tsx b/src/pages/DuplicateFilesPage.tsx index df76381..f45b50f 100644 --- a/src/pages/DuplicateFilesPage.tsx +++ b/src/pages/DuplicateFilesPage.tsx @@ -4,6 +4,7 @@ import { FolderPlus, Lock, MapPin, + ScanSearch, ShieldAlert, Sparkles, Trash2, @@ -286,10 +287,19 @@ export function DuplicateFilesPage({ ))} - @@ -338,7 +348,7 @@ export function DuplicateFilesPage({ icon={} title={t("No duplicate scan yet", "还没有扫描过重复文件")} description={t( - "The first scan walks your files once; later scans reuse the hash cache and only re-check what changed.", + "Start scan walks your files once; later scans reuse the hash cache and only re-check what changed.", "首次扫描遍历一遍文件;之后的扫描复用哈希缓存,只重算发生变化的文件。", )} /> diff --git a/src/pages/LargeFilesPage.tsx b/src/pages/LargeFilesPage.tsx index 86ed01c..cb2d664 100644 --- a/src/pages/LargeFilesPage.tsx +++ b/src/pages/LargeFilesPage.tsx @@ -2,11 +2,13 @@ import { Archive, Disc3, Cloud, + FileQuestion, FileVideo, HardDrive, Lock, MapPin, Package, + ScanSearch, ShieldAlert, Trash2, } from "lucide-react"; @@ -225,8 +227,19 @@ export function LargeFilesPage({ ); })} - @@ -240,6 +253,17 @@ export function LargeFilesPage({ /> ) : null} + {!files && !scanning ? ( + } + title={t("No large-file scan yet", "还没有扫描过大文件")} + description={t( + "Start scan walks every drive above the size floor; results sort heaviest first.", + "点击「开始扫描」按体积门槛遍历所选磁盘,结果从最大往下排。", + )} + /> + ) : null} + {visible && visible.length === 0 && !scanning ? ( } diff --git a/src/pages/SpacePage.tsx b/src/pages/SpacePage.tsx index 3d824b9..b34e92a 100644 --- a/src/pages/SpacePage.tsx +++ b/src/pages/SpacePage.tsx @@ -1024,20 +1024,7 @@ export function SpacePage({ return (
- {embedded ? ( -
- -
- ) : ( + {!embedded ? (
{t("Space cleaning", "空间清理")}
@@ -1051,44 +1038,53 @@ export function SpacePage({ )}

+
+ ) : null} + + {/* Shared hub toolbar: config items wrap on the left, one big primary + action pinned right — the three space tabs dress it identically. */} +
+
+ + {t("Deep-scan folders", "深度扫描目录")} + + + {t( + "Auto-discovered: Desktop, Documents, project folders on every drive", + "自动发现:桌面、文档、各磁盘根目录下的项目目录(无需设置)", + )} + + + + {t("Older than", "仅处理早于")} + +
+ {AGE_CHOICES.map((days) => ( + + ))} +
+
-
- )} - -
- - {t("Deep-scan folders", "深度扫描目录")} - - - {t( - "Auto-discovered: Desktop, Documents, project folders on every drive", - "自动发现:桌面、文档、各磁盘根目录下的项目目录(无需设置)", - )} - - - {t("Older than", "仅处理早于")} - -
- {AGE_CHOICES.map((days) => ( - - ))} -
{/* Git 保护不再有开关:它永远是开着的(删前用 git 复核被跟踪的目录), 需要绕过时走 CLI 的 --all。 */}
@@ -1169,16 +1165,9 @@ export function SpacePage({ {t( "Not scanned yet. Start scan checks known cache spots and auto-discovers project folders across the machine.", - "尚未扫描。点击「开始扫描」,Squid 会检查已知缓存位置,并自动发现本机各处的项目构建目录。", + "尚未扫描。点击右侧「开始扫描」,Squid 会检查已知缓存位置,并自动发现本机各处的项目构建目录。", )} - {/* Embedded: the head button is hidden inside the hub, so the - empty stage carries its own entry point. */} - {embedded ? ( - - ) : null}
) : null} diff --git a/src/styles.css b/src/styles.css index 8816526..fb4c7b7 100644 --- a/src/styles.css +++ b/src/styles.css @@ -5486,6 +5486,30 @@ select:focus-visible, background: #fff; } +/* Config bars of the three space tabs all end in the same big primary CTA + pinned right; labels/segs wrap inside .config-items on the left. */ +.config-items { + display: flex; + align-items: center; + flex: 1 1 auto; + flex-wrap: wrap; + gap: 12px; + min-width: 0; +} + +.space-config-spacer { + flex: 1 1 auto; +} + +.page.is-embedded .space-config { + margin-top: 14px; +} + +.button.scan-cta { + flex: 0 0 auto; + margin-left: auto; +} + .space-config-label { color: #3a3226; font-size: var(--nex-text-2xs);