diff --git a/apps/x/apps/renderer/src/extensions/calendar-block.tsx b/apps/x/apps/renderer/src/extensions/calendar-block.tsx index f72dc5d4..9f0eec02 100644 --- a/apps/x/apps/renderer/src/extensions/calendar-block.tsx +++ b/apps/x/apps/renderer/src/extensions/calendar-block.tsx @@ -9,12 +9,15 @@ function formatTime(dateStr: string): string { return d.toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' }) } -function getDateParts(dateStr: string): { day: number; month: string; weekday: string } { +function getDateParts(dateStr: string): { day: number; month: string; weekday: string; isToday: boolean } { const d = new Date(dateStr) + const now = new Date() + const isToday = d.getDate() === now.getDate() && d.getMonth() === now.getMonth() && d.getFullYear() === now.getFullYear() return { day: d.getDate(), - month: d.toLocaleDateString([], { month: 'long' }), - weekday: d.toLocaleDateString([], { weekday: 'short' }), + month: d.toLocaleDateString([], { month: 'short' }).toUpperCase(), + weekday: d.toLocaleDateString([], { weekday: 'short' }).toUpperCase(), + isToday, } } @@ -62,7 +65,8 @@ interface ResolvedEvent { conferenceLink?: string } -const EVENT_BAR_COLOR = '#7ec8c8' +const GCAL_EVENT_COLOR = '#039be5' +const GCAL_TODAY_COLOR = '#1a73e8' function JoinMeetingSplitButton({ onJoinAndNotes, onNotesOnly }: { onJoinAndNotes: () => void @@ -273,11 +277,8 @@ function CalendarBlockView({ node, deleteNode }: { node: { attrs: Record {parts ? ( <> - {parts.day} -
- {parts.month} - {parts.weekday} -
+ {parts.weekday} + {parts.day} ) : ( ? @@ -288,16 +289,13 @@ function CalendarBlockView({ node, deleteNode }: { node: { attrs: Record e.stopPropagation()} onClick={(e) => { e.stopPropagation(); handleEventClick(event) }} > -
- {event.summary || 'Untitled event'} + {event.summary || '(No title)'}
{getTimeRange(event)} diff --git a/apps/x/apps/renderer/src/extensions/email-block.tsx b/apps/x/apps/renderer/src/extensions/email-block.tsx index 9be8c72c..3cd4d8fb 100644 --- a/apps/x/apps/renderer/src/extensions/email-block.tsx +++ b/apps/x/apps/renderer/src/extensions/email-block.tsx @@ -17,9 +17,6 @@ function formatEmailDate(dateStr: string): string { } } -function getInitials(name: string): string { - return name.split(/\s+/).map(w => w[0]).filter(Boolean).slice(0, 2).join('').toUpperCase() -} declare global { interface Window { @@ -152,29 +149,31 @@ function EmailBlockView({ node, deleteNode, updateAttributes }: { ? `https://mail.google.com/mail/u/0/#all/${config.threadId}` : null + const senderName = config.from || 'Unknown' + // --- Render: Draft mode (draft_response present) --- if (hasDraft) { return ( -
e.stopPropagation()}> +
e.stopPropagation()}> - {/* Draft header */} - {config.to && ( -
+ {/* Draft header – Gmail compose style */} +
+ {config.to && (
To {config.to}
- {config.subject && ( -
- Subject - {config.subject} -
- )} -
- )} + )} + {config.subject && ( +
+ Subject + {config.subject} +
+ )} +
{/* Editable draft body */}