From 5508c14663dc6df4f203523ca3c0dd8ec224133f Mon Sep 17 00:00:00 2001 From: TooonyChen <26252739+TooonyChen@users.noreply.github.com> Date: Thu, 9 Jul 2026 15:29:30 +1200 Subject: [PATCH] feat(web): show sender address in mail detail + mobile master-detail view - From line now renders the org name followed by when both exist. - On mobile ((null); const [selectedMailId, setSelectedMailId] = useState(null); + // 移动端 ((null); const [isDetailLoading, setIsDetailLoading] = useState(false); @@ -170,7 +172,7 @@ export function InboxPage({ user }: { user: User }): JSX.Element { return (
- + @@ -256,7 +258,13 @@ export function InboxPage({ user }: { user: User }): JSX.Element { 'cursor-pointer bg-transparent transition-colors hover:bg-[#1a1a1a]', active && 'bg-[#252525]', )} - onClick={() => setSelectedMailId(item.id)} + onClick={() => { + setSelectedMailId(item.id); + setIsMobileDetailOpen(true); + if (!window.matchMedia('(min-width: 1024px)').matches) { + window.scrollTo({ top: 0 }); + } + }} >
{item.fromOrg || item.fromAddr || '-'}
@@ -294,9 +302,20 @@ export function InboxPage({ user }: { user: User }): JSX.Element {
- + - Mail Detail +
+ + Mail Detail +
{detailError ? ( @@ -315,8 +334,13 @@ export function InboxPage({ user }: { user: User }): JSX.Element { ) : detail ? ( <> -
-
From: {detail.fromOrg || detail.fromAddr || '-'}
+
+
+ From: {detail.fromOrg || detail.fromAddr || '-'} + {detail.fromOrg && detail.fromAddr ? ( + <{detail.fromAddr}> + ) : null} +
To:{' '} {detail.toAddr || '-'}