From f7611f2e65d1640dc4ad696f613d223e2cd2dc06 Mon Sep 17 00:00:00 2001 From: Julian Freeman Date: Sat, 18 Apr 2026 11:41:03 -0400 Subject: [PATCH] op history table --- .../browser-data/HistoryCleanupList.vue | 122 ++++++++++-------- 1 file changed, 65 insertions(+), 57 deletions(-) diff --git a/src/components/browser-data/HistoryCleanupList.vue b/src/components/browser-data/HistoryCleanupList.vue index 2d973f0..a529927 100644 --- a/src/components/browser-data/HistoryCleanupList.vue +++ b/src/components/browser-data/HistoryCleanupList.vue @@ -37,14 +37,6 @@ const allSelected = computed( ), ); -function statusLabel(status: CleanupFileStatus) { - return status === "found" ? "存在" : "缺失"; -} - -function statusClass(status: CleanupFileStatus) { - return status === "found" ? "found" : "missing"; -} - function isSelected(profileId: string) { return props.selectedProfileIds.includes(profileId); } @@ -62,6 +54,18 @@ function isSelectable(profile: ProfileSummary) { function hasAnyHistoryFile(statuses: CleanupFileStatus[]) { return statuses.some((status) => status === "found"); } + +function cleanupItems(profile: ProfileSummary) { + const items = [ + { key: "history", label: "历史记录", status: profile.historyCleanup.history }, + { key: "top-sites", label: "热门站点", status: profile.historyCleanup.topSites }, + { key: "visited-links", label: "访问链接", status: profile.historyCleanup.visitedLinks }, + { key: "shortcuts", label: "快捷方式", status: profile.historyCleanup.shortcuts }, + { key: "sessions", label: "会话", status: profile.historyCleanup.sessions }, + ]; + + return items.filter((item) => item.status === "found"); +}