From cba3c8c4f070bd42012d4f398008cf71a37fee7d Mon Sep 17 00:00:00 2001 From: Misaka_Company Date: Tue, 14 Apr 2026 14:34:32 +0800 Subject: [PATCH] feat(ui): use icons with tooltips for material results MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace text badges with icons for cleaner UI - Map database values: 'success'→deleted, 'skipped', 'uncertain', 'failed_*'→failed - Add hover tooltip showing status name (Deleted, Skipped, Uncertain, Failed) - Icons: CheckCircle (green), CircleMinus (gray), AlertTriangle (amber), XCircle (red) - Add cursor-help to indicate hoverable elements --- .../CleanerOperationHistoryModal.tsx | 70 +++++++++++++------ 1 file changed, 47 insertions(+), 23 deletions(-) diff --git a/src/renderer/src/components/CleanerOperationHistoryModal.tsx b/src/renderer/src/components/CleanerOperationHistoryModal.tsx index 7df1d64..610d9b0 100644 --- a/src/renderer/src/components/CleanerOperationHistoryModal.tsx +++ b/src/renderer/src/components/CleanerOperationHistoryModal.tsx @@ -16,6 +16,8 @@ import { ChevronRight, CheckCircle, XCircle, + CircleMinus, + AlertTriangle, Clock, Copy, FlaskConical @@ -566,29 +568,51 @@ const BatchItem = React.memo(({ batch, isAdmin, onDelete }: BatchItemProps) => { {mat.rowNumber} - - {mat.result === 'deleted' - ? '已删除' - : mat.result === 'skipped' - ? '已跳过' - : mat.result === 'failed' - ? '失败' - : mat.result === 'uncertain' - ? '不确定' - : mat.result} - + {mat.result === 'success' || mat.result === 'deleted' ? ( + + + + ) : mat.result === 'skipped' ? ( + + + + ) : mat.result === 'uncertain' ? ( + + + + ) : mat.result?.startsWith('failed') ? ( + + + + ) : null} {mat.reason || '-'}