From 0b9044dc016ffe20ef66694eb9c2bbc180e4a65a Mon Sep 17 00:00:00 2001 From: cfdaily Date: Wed, 20 May 2026 23:03:58 +0800 Subject: [PATCH] auto-sync: 2026-05-20 23:03:58 --- .../src/components/NotificationCenter.tsx | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/frontend/src/components/NotificationCenter.tsx b/src/frontend/src/components/NotificationCenter.tsx index 46aaa09..ec1356b 100644 --- a/src/frontend/src/components/NotificationCenter.tsx +++ b/src/frontend/src/components/NotificationCenter.tsx @@ -156,31 +156,30 @@ export default function NotificationCenter({ onClose }: { onClose: () => void })
{g.items.map(n => { const s = TYPE_STYLES[n.type]; - const isExpanded = expanded === n.id; return ( -
{ + // 直接操作:有任务链接就跳转,否则标记已读 + if (n.taskId) { handleViewTask(n); } + else if (!n.read) { handleMarkRead(n); } + }} style={{ padding: '8px 10px', borderRadius: 8, background: 'var(--panel2)', border: `1px solid ${n.read ? 'var(--line)' : s.color + '44'}`, opacity: n.read ? 0.5 : 1, + cursor: 'pointer', + transition: 'opacity 0.15s', }}> -
setExpanded(isExpanded ? null : n.id)}> +
{s.icon} {n.title} {n.source === 'mail' ? '✉️' : '📡'} + {!n.read && }
{n.message}
- {isExpanded && ( -
- {n.taskId && ( - - )} - {!n.read && ( - - )} -
- )} +
+ {n.taskId ? '👆 点击查看任务' : !n.read ? '👆 点击标记已读' : ''} +
); })}