From f6167fdaec7b4132a646c356e56010df12e48495 Mon Sep 17 00:00:00 2001 From: sky121113 Date: Mon, 19 Jan 2026 16:01:27 +0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=E9=9A=B1=E8=97=8F=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E7=B4=80=E9=8C=84=E4=B8=AD=E7=9A=84=E5=AF=86=E7=A2=BC=E4=B8=A6?= =?UTF-8?q?=E4=B8=AD=E6=96=87=E5=8C=96=E5=B8=B3=E8=99=9F=E6=AC=84=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 ActivityDetailDialog 中將 password 欄位顯示為 ****** - 將 username 欄位名稱從 Username 翻譯為 登入帳號 --- .../js/Components/ActivityLog/ActivityDetailDialog.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/js/Components/ActivityLog/ActivityDetailDialog.tsx b/resources/js/Components/ActivityLog/ActivityDetailDialog.tsx index 79be7a5..b524e5d 100644 --- a/resources/js/Components/ActivityLog/ActivityDetailDialog.tsx +++ b/resources/js/Components/ActivityLog/ActivityDetailDialog.tsx @@ -45,6 +45,7 @@ interface Props { const fieldLabels: Record = { name: '名稱', code: '代碼', + username: '登入帳號', description: '描述', price: '價格', cost: '成本', @@ -146,8 +147,6 @@ export default function ActivityDetailDialog({ open, onOpenChange, activity }: P return a.localeCompare(b); }); - // Helper to check if a key is a snapshot name field - // Helper to check if a key is a snapshot name field const isSnapshotField = (key: string) => { return [ @@ -176,6 +175,9 @@ export default function ActivityDetailDialog({ open, onOpenChange, activity }: P }; const formatValue = (key: string, value: any) => { + // Mask password + if (key === 'password') return '******'; + if (value === null || value === undefined) return '-'; if (typeof value === 'boolean') return value ? '是' : '否'; if (key === 'is_active') return value ? '啟用' : '停用';