diff --git a/apps/x/apps/renderer/src/App.css b/apps/x/apps/renderer/src/App.css index a28bf1c1..4bb94747 100644 --- a/apps/x/apps/renderer/src/App.css +++ b/apps/x/apps/renderer/src/App.css @@ -124,22 +124,26 @@ background: rgba(60, 64, 67, 0.08); } -.gmail-layout { - display: grid; - grid-template-columns: minmax(420px, 0.45fr) minmax(480px, 0.55fr); +.gmail-list { + display: flex; + flex-direction: column; + min-width: 0; min-height: 0; flex: 1; - overflow: hidden; + overflow: auto; border-radius: 16px; background: #fff; border: 1px solid #e4e7ee; } -.gmail-list { - min-width: 0; - min-height: 0; - overflow: auto; - border-right: 1px solid #e4e7ee; +.gmail-row-group { + display: flex; + flex-direction: column; + border-bottom: 1px solid #f1f3f4; +} + +.gmail-row-group:last-child { + border-bottom: none; } .gmail-list-header { @@ -165,7 +169,6 @@ min-height: 44px; padding: 0 12px; border: none; - border-bottom: 1px solid #f1f3f4; background: #f6f8fc; color: #5f6368; text-align: left; @@ -248,28 +251,52 @@ .gmail-detail { display: flex; min-width: 0; - min-height: 0; flex-direction: column; background: #fff; } +.gmail-detail-inline { + background: #f6f8fc; + border-top: 1px solid #e4e7ee; + box-shadow: inset 3px 0 0 #1a73e8; +} + .gmail-detail-toolbar { display: flex; align-items: center; - gap: 4px; - height: 44px; - padding: 0 12px; + justify-content: space-between; + gap: 12px; + height: 48px; + padding: 0 16px; border-bottom: 1px solid #e8eaed; + background: #fff; } -.gmail-back-button { - display: none; +.gmail-thread-subject-inline { + flex: 1; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + color: #202124; + font-size: 15px; + font-weight: 500; } -.gmail-thread-scroll { - min-height: 0; - overflow: auto; - padding: 24px 32px 40px; +.gmail-detail-toolbar-actions { + display: flex; + align-items: center; + gap: 2px; +} + +.gmail-detail-toolbar-actions .gmail-icon-button span { + font-size: 20px; + line-height: 1; +} + +.gmail-thread-body { + padding: 20px 28px 32px; + background: #fff; } .gmail-thread-subject-row { diff --git a/apps/x/apps/renderer/src/components/email-view.tsx b/apps/x/apps/renderer/src/components/email-view.tsx index 4854f4eb..58fdf262 100644 --- a/apps/x/apps/renderer/src/components/email-view.tsx +++ b/apps/x/apps/renderer/src/components/email-view.tsx @@ -247,29 +247,27 @@ function ComposeBox({ function ThreadDetail({ thread, - onBack, + onClose, }: { thread: GmailThread - onBack: () => void + onClose: () => void }) { const [composeMode, setComposeMode] = useState(null) return ( -
+
- - - +
{thread.subject || '(No subject)'}
+
+ + + +
-
-
-

{thread.subject || '(No subject)'}

- Inbox -
- +
{thread.messages.map((message, index) => { const isLast = index === thread.messages.length - 1 @@ -399,7 +397,7 @@ export function EmailView() { }) }, [query, threads]) - const selectedThread = filteredThreads.find(thread => thread.threadId === selectedThreadId) ?? filteredThreads[0] ?? null + const hasThreads = filteredThreads.length > 0 return (
@@ -420,23 +418,22 @@ export function EmailView() { {error ? (
Could not load mail: {error}
- ) : selectedThread ? ( -
-
-
- Last 2 days - {filteredThreads.length} threads -
- {filteredThreads.map((thread) => { - const latest = latestMessage(thread) - const isSelected = thread.threadId === selectedThread.threadId - const isUnread = thread.unread === true - return ( + ) : hasThreads ? ( +
+
+ Last 2 days + {filteredThreads.length} threads +
+ {filteredThreads.map((thread) => { + const latest = latestMessage(thread) + const isSelected = thread.threadId === selectedThreadId + const isUnread = thread.unread === true + return ( +
- ) - })} -
- - setSelectedThreadId(null)} - /> + {isSelected && ( + setSelectedThreadId(null)} + /> + )} +
+ ) + })}
) : (