@open-workspace/email 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -4
- package/alchemy/index.ts +130 -2
- package/drizzle/mailbox/0002_good_komodo.sql +2 -0
- package/drizzle/mailbox/0003_after_0_4_2.sql +180 -0
- package/drizzle/mailbox/meta/0002_snapshot.json +1017 -0
- package/drizzle/mailbox/meta/0003_snapshot.json +1507 -0
- package/drizzle/mailbox/meta/_journal.json +14 -0
- package/drizzle/mailbox/migrations.js +5 -1
- package/migrations/0001_overrated_ricochet.sql +2 -0
- package/migrations/0002_after_0_4_2.sql +35 -0
- package/migrations/meta/0001_snapshot.json +564 -0
- package/migrations/meta/0002_snapshot.json +807 -0
- package/migrations/meta/_journal.json +14 -0
- package/package.json +23 -7
- package/shared/attachment-preview.ts +18 -8
- package/shared/folder-order.ts +31 -6
- package/shared/mail-headers.ts +3 -3
- package/shared/mail-html.ts +25 -0
- package/shared/mail-import.ts +0 -7
- package/shared/mail-received.ts +4 -4
- package/shared/mail-rule-actions.ts +47 -0
- package/shared/mail.ts +70 -4
- package/shared/office-preview.ts +0 -4
- package/shared/pdfjs-assets.ts +1 -3
- package/shared/rich-content.ts +35 -0
- package/shared/signature.ts +15 -0
- package/src/admin/address-auto-reply.tsx +49 -0
- package/src/admin/blocked-senders.tsx +86 -66
- package/src/admin/forward-destinations.tsx +140 -0
- package/src/admin/mail-archive.tsx +134 -0
- package/src/admin/team-signature.tsx +90 -0
- package/src/client.tsx +130 -16
- package/src/mail/attachment-preview-dialog.tsx +13 -5
- package/src/mail/auto-reply-banner.tsx +61 -0
- package/src/mail/blocked-senders.tsx +124 -91
- package/src/mail/compose-window-chrome.tsx +20 -8
- package/src/mail/compose-window.tsx +387 -365
- package/src/mail/composer-asset-bookmarks.ts +47 -12
- package/src/mail/composer-attachment-list.tsx +42 -17
- package/src/mail/composer-editor-document.ts +54 -10
- package/src/mail/composer-editor.tsx +44 -44
- package/src/mail/composer-link-text.ts +42 -0
- package/src/mail/composer-recipient-fields.tsx +25 -16
- package/src/mail/composer-recipients.ts +62 -16
- package/src/mail/composer-session.ts +107 -23
- package/src/mail/composer-toolbar.tsx +15 -1
- package/src/mail/composer-upload-client.ts +29 -1
- package/src/mail/composer-upload-progress.ts +2 -2
- package/src/mail/conversation-actions-model.ts +56 -0
- package/src/mail/conversation-list.tsx +263 -128
- package/src/mail/conversation-loading-skeleton.tsx +165 -90
- package/src/mail/conversation-message.tsx +257 -102
- package/src/mail/conversation-order.ts +12 -0
- package/src/mail/conversation-reply.tsx +313 -189
- package/src/mail/conversation-selection-toolbar.tsx +188 -143
- package/src/mail/conversation-view.tsx +320 -85
- package/src/mail/delivery-indicator.tsx +33 -12
- package/src/mail/draft-attachments.ts +194 -0
- package/src/mail/email-html-body.tsx +97 -53
- package/src/mail/folder-cleanup-bar.tsx +193 -0
- package/src/mail/folder-glyph.tsx +5 -0
- package/src/mail/folder-manager.tsx +71 -38
- package/src/mail/mail-app-bar.tsx +15 -3
- package/src/mail/mail-dock.tsx +19 -3
- package/src/mail/mail-focus.ts +48 -0
- package/src/mail/mail-folders.ts +14 -2
- package/src/mail/mail-layout.css +20 -0
- package/src/mail/mail-mailbox-sheet.tsx +22 -69
- package/src/mail/mail-nav-rail.tsx +7 -4
- package/src/mail/mail-nav.tsx +66 -46
- package/src/mail/mail-prefetch.ts +30 -9
- package/src/mail/mail-primitives.tsx +6 -4
- package/src/mail/mail-queries.ts +122 -20
- package/src/mail/mail-query-cache.ts +1085 -173
- package/src/mail/mail-search-params.ts +35 -0
- package/src/mail/mail-shell.tsx +32 -9
- package/src/mail/mailbox-ai-settings.tsx +56 -42
- package/src/mail/mailbox-realtime.tsx +4 -12
- package/src/mail/mailbox-rules.tsx +898 -0
- package/src/mail/message-actions.tsx +38 -26
- package/src/mail/message-attachments.tsx +20 -12
- package/src/mail/message-body.ts +53 -0
- package/src/mail/message-format.ts +8 -2
- package/src/mail/message-header.tsx +3 -1
- package/src/mail/message-translation.tsx +34 -67
- package/src/mail/original-message-sheet.tsx +63 -50
- package/src/mail/original-message.ts +6 -6
- package/src/mail/pane-splitter.tsx +3 -3
- package/src/mail/pdf-preview.tsx +70 -62
- package/src/mail/plain-message-text.tsx +28 -0
- package/src/mail/print-message.ts +31 -36
- package/src/mail/reader-pane.tsx +134 -102
- package/src/mail/recipient-combobox.tsx +52 -29
- package/src/mail/recipient-field-row.tsx +3 -0
- package/src/mail/rich-content.ts +128 -0
- package/src/mail/sanitize-email-html.ts +57 -33
- package/src/mail/sender-actions.tsx +49 -39
- package/src/mail/sender-authentication.tsx +1 -1
- package/src/mail/sender-dialogs.tsx +67 -43
- package/src/mail/sender-security.tsx +9 -10
- package/src/mail/signature.ts +43 -0
- package/src/mail/translation-html.ts +3 -3
- package/src/mail/types.ts +12 -0
- package/src/mail/use-composer-attachment-preflight.ts +23 -60
- package/src/mail/use-composer-core.ts +286 -0
- package/src/mail/use-composer-navigation.ts +120 -0
- package/src/mail/use-composer-submission.ts +154 -19
- package/src/mail/use-conversation-actions.ts +292 -0
- package/src/mail/use-conversation-position.ts +51 -0
- package/src/mail/use-conversation-selection.ts +192 -89
- package/src/mail/use-draft-autosave.ts +394 -0
- package/src/mail/use-drafts.ts +194 -0
- package/src/mail/use-mail-controller.ts +754 -213
- package/src/mail/use-mail-data.ts +210 -100
- package/src/mail/use-mail-safety.ts +19 -38
- package/src/mail/use-mail-send.ts +18 -6
- package/src/mail/use-pdf-translation.ts +1 -1
- package/src/mail/use-reply-cc.ts +61 -0
- package/src/mail/use-visible-message-read.ts +128 -64
- package/src/pwa/push-key.ts +18 -0
- package/src/pwa/push-subscription.ts +88 -26
- package/src/settings/auto-reply-editor.tsx +454 -0
- package/src/settings/auto-reply-page.tsx +59 -0
- package/src/settings/mail-apps-page.tsx +52 -43
- package/src/settings/notifications-page.tsx +82 -67
- package/src/settings/rich-content-editor.tsx +182 -0
- package/src/settings/settings-queries.ts +57 -0
- package/src/settings/signature-editor.tsx +142 -0
- package/src/settings/signature-page.tsx +70 -0
- package/worker/admin/blocked-sender-routes.ts +10 -16
- package/worker/backups/eml.ts +185 -0
- package/worker/backups/file-parts.ts +140 -0
- package/worker/backups/mail-backup.ts +644 -0
- package/worker/backups/settings-backup.ts +866 -0
- package/worker/backups/stream-eml.ts +73 -0
- package/worker/db/schema.ts +98 -2
- package/worker/jmap/attachment-blobs.ts +113 -0
- package/worker/jmap/blobs.ts +162 -0
- package/worker/jmap/draft-content.ts +42 -0
- package/worker/jmap/drafts.ts +70 -0
- package/worker/jmap/email-body.ts +152 -0
- package/worker/jmap/email-methods.ts +1223 -0
- package/worker/jmap/eventsource.ts +9 -8
- package/worker/jmap/import-methods.ts +205 -0
- package/worker/jmap/mailbox-methods.ts +187 -0
- package/worker/jmap/method-core.ts +379 -0
- package/worker/jmap/methods.ts +108 -1815
- package/worker/jmap/push-subscription-methods.ts +373 -0
- package/worker/jmap/push-types.ts +46 -2
- package/worker/jmap/push.ts +24 -31
- package/worker/jmap/routes.ts +144 -153
- package/worker/jmap/submission-methods.ts +395 -0
- package/worker/mail/access.ts +35 -12
- package/worker/mail/ai-classification.ts +2 -2
- package/worker/mail/archive-object.ts +96 -0
- package/worker/mail/archive-routes.ts +35 -0
- package/worker/mail/archive.ts +682 -0
- package/worker/mail/auth-headers.ts +48 -40
- package/worker/mail/auto-reply-routes.ts +255 -0
- package/worker/mail/auto-reply.ts +243 -0
- package/worker/mail/bimi.ts +53 -36
- package/worker/mail/bootstrap.ts +11 -3
- package/worker/mail/capabilities.ts +69 -0
- package/worker/mail/classification-signals.ts +1 -1
- package/worker/mail/confusables-data.ts +9 -0
- package/worker/mail/conversation-cursor.ts +6 -15
- package/worker/mail/delivery-events.ts +9 -7
- package/worker/mail/delivery-facts.ts +1 -1
- package/worker/mail/demo-routes.ts +3 -3
- package/worker/mail/doh.ts +3 -3
- package/worker/mail/download-links.ts +153 -0
- package/worker/mail/downloads.ts +2 -6
- package/worker/mail/draft-routes.ts +473 -0
- package/worker/mail/draft-sender.ts +54 -0
- package/worker/mail/edge-cache.ts +41 -55
- package/worker/mail/email-routing.ts +123 -0
- package/worker/mail/forward-destinations.ts +114 -0
- package/worker/mail/forward-downloads.ts +115 -0
- package/worker/mail/forward-html.ts +85 -0
- package/worker/mail/header-metadata.ts +2 -5
- package/worker/mail/impersonation.ts +102 -101
- package/worker/mail/import-routes.ts +29 -82
- package/worker/mail/import.ts +130 -0
- package/worker/mail/inbound-delivery.ts +6 -5
- package/worker/mail/inbound.ts +58 -28
- package/worker/mail/ip-intel.ts +8 -17
- package/worker/mail/isolate-cache.ts +1 -1
- package/worker/mail/mailbox-deletion.ts +33 -12
- package/worker/mail/mailbox-directory.ts +39 -65
- package/worker/mail/mailing-list.ts +29 -58
- package/worker/mail/message-security.ts +3 -3
- package/worker/mail/message-view.ts +12 -10
- package/worker/mail/office-conversion.ts +3 -5
- package/worker/mail/office-preview-container.ts +3 -8
- package/worker/mail/outbound-content.ts +139 -65
- package/worker/mail/outbound-delivery.ts +20 -17
- package/worker/mail/outbound-service.ts +34 -9
- package/worker/mail/outbound.ts +146 -75
- package/worker/mail/outgoing-context.ts +60 -30
- package/worker/mail/participants.ts +10 -15
- package/worker/mail/plain-body.ts +39 -0
- package/worker/mail/push-endpoint.ts +17 -0
- package/worker/mail/push-notifications.ts +87 -43
- package/worker/mail/quote-parser.ts +107 -25
- package/worker/mail/r2-presigned-urls.ts +7 -0
- package/worker/mail/receive.ts +146 -39
- package/worker/mail/recipients.ts +1 -1
- package/worker/mail/remote-proxy.ts +3 -3
- package/worker/mail/repeat.ts +1 -1
- package/worker/mail/reply-plan.ts +124 -26
- package/worker/mail/rfc.ts +15 -7
- package/worker/mail/rich-content.ts +207 -0
- package/worker/mail/routes.ts +696 -304
- package/worker/mail/routing.ts +274 -0
- package/worker/mail/rules.ts +230 -0
- package/worker/mail/safety-routes.ts +88 -80
- package/worker/mail/schemas.ts +222 -31
- package/worker/mail/search.ts +25 -2
- package/worker/mail/security-settings.ts +4 -10
- package/worker/mail/send-message.ts +238 -0
- package/worker/mail/sender-intel.ts +12 -20
- package/worker/mail/signature-routes.ts +201 -0
- package/worker/mail/signatures.ts +195 -0
- package/worker/mail/spamhaus.ts +28 -16
- package/worker/mail/storage-keys.ts +35 -0
- package/worker/mail/unsubscribe.ts +19 -41
- package/worker/mail/uploads.ts +193 -80
- package/worker/mail/webhook-source.ts +3 -2
- package/worker/mail/workspace-safety.ts +194 -60
- package/worker/mailbox/demo.ts +13 -15
- package/worker/mailbox/email-index.ts +92 -13
- package/worker/mailbox/folder-model.ts +0 -20
- package/worker/mailbox/import-placement.ts +21 -36
- package/worker/mailbox/inbound-decision.ts +114 -0
- package/worker/mailbox/inbox-counts.ts +45 -25
- package/worker/mailbox/index.ts +843 -2888
- package/worker/mailbox/jmap-change-log.ts +195 -0
- package/worker/mailbox/jmap-email-rows.ts +186 -0
- package/worker/mailbox/jmap-mailboxes.ts +116 -0
- package/worker/mailbox/jmap-placement.ts +139 -0
- package/worker/mailbox/jmap-query-filter.ts +231 -0
- package/worker/mailbox/jmap-store.ts +167 -299
- package/worker/mailbox/mailbox-auto-reply.ts +301 -0
- package/worker/mailbox/mailbox-backup.ts +538 -0
- package/worker/mailbox/mailbox-drafts.ts +417 -0
- package/worker/mailbox/mailbox-folders.ts +242 -0
- package/worker/mailbox/mailbox-import.ts +450 -0
- package/worker/mailbox/mailbox-inbound.ts +934 -0
- package/worker/mailbox/mailbox-jmap.ts +294 -0
- package/worker/mailbox/mailbox-outbound.ts +413 -0
- package/worker/mailbox/mailbox-rules.ts +336 -0
- package/worker/mailbox/mailbox-senders.ts +294 -0
- package/worker/mailbox/mailbox-storage.ts +438 -0
- package/worker/mailbox/mailbox-views.ts +891 -0
- package/worker/mailbox/model.ts +1 -0
- package/worker/mailbox/office-preview-jobs.ts +59 -47
- package/worker/mailbox/placement.ts +933 -0
- package/worker/mailbox/restore-thread.ts +52 -0
- package/worker/mailbox/retention.ts +36 -0
- package/worker/mailbox/schema.ts +211 -1
- package/worker/mailbox/senders.ts +216 -178
- package/worker/mailbox/spam-undo-filing.ts +138 -0
- package/worker/mailbox/spam-undo.ts +240 -0
- package/worker/mailbox/support.ts +416 -0
- package/worker/mcp/mail-action-tools.ts +156 -0
- package/worker/mcp/mail-compose-tools.ts +8 -2
- package/worker/mcp/mail-safety-tools.ts +4 -4
- package/worker/module.ts +23 -2
- package/src/mail/use-compose-submission.ts +0 -208
- package/src/mail/use-reply-submission.ts +0 -114
- package/worker/mail/capped-body.ts +0 -36
|
@@ -1,119 +1,194 @@
|
|
|
1
|
-
import { Skeleton } from "@open-workspace/core/ui";
|
|
2
|
-
import {
|
|
1
|
+
import { Skeleton, cn } from "@open-workspace/core/ui";
|
|
2
|
+
import { ChevronDown } from "lucide-react";
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import {
|
|
5
|
+
ConversationHeading,
|
|
6
|
+
ExpandedMessageFrame,
|
|
7
|
+
HeaderAvatar,
|
|
8
|
+
HeaderDate,
|
|
9
|
+
OutgoingMark,
|
|
10
|
+
messageBodyColumnClassName,
|
|
11
|
+
messageSectionClassName,
|
|
12
|
+
recipientsLineClassName,
|
|
13
|
+
} from "./conversation-message";
|
|
14
|
+
import { DeliveryIndicator } from "./delivery-indicator";
|
|
15
|
+
import { BodySkeleton } from "./email-html-body";
|
|
16
|
+
import { MESSAGE_PAGE_SIZE } from "./mail-queries";
|
|
17
|
+
import { isOwnAddress, recipientSummary, senderName } from "./message-format";
|
|
18
|
+
import { SenderLine } from "./message-header";
|
|
19
|
+
import type { ConversationSummary, Mailbox } from "./types";
|
|
7
20
|
|
|
8
|
-
|
|
9
|
-
|
|
21
|
+
/** A conversation's own row in the list, which shows its latest message. */
|
|
22
|
+
type ConversationRow = Extract<ConversationSummary, { draftId: null }>;
|
|
10
23
|
|
|
11
|
-
|
|
24
|
+
/** Holds the reply and More actions' place in a header that is loading. */
|
|
25
|
+
function ActionsPlaceholder() {
|
|
26
|
+
return (
|
|
27
|
+
<div aria-hidden="true" className="-mr-1.5 flex shrink-0 items-center">
|
|
28
|
+
<span className="size-7" />
|
|
29
|
+
<span className="size-7" />
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
12
33
|
|
|
13
|
-
|
|
34
|
+
/** An older message's one-line row, still loading. */
|
|
35
|
+
function CollapsedMessagePlaceholder() {
|
|
36
|
+
return (
|
|
37
|
+
<div aria-hidden="true" className={messageSectionClassName}>
|
|
38
|
+
<div className="flex items-center gap-3 px-4 py-2.5 sm:px-6">
|
|
39
|
+
<Skeleton className="size-7 shrink-0 rounded-full" />
|
|
40
|
+
<Skeleton className="h-3 w-28" />
|
|
41
|
+
<Skeleton className="h-3 flex-1" />
|
|
42
|
+
<Skeleton className="h-3 w-12" />
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
14
47
|
|
|
15
|
-
|
|
48
|
+
/** An expanded message whose sender is not known yet. */
|
|
49
|
+
function ExpandedMessagePlaceholder() {
|
|
50
|
+
return (
|
|
51
|
+
<div aria-hidden="true" className={messageSectionClassName}>
|
|
52
|
+
<ExpandedMessageFrame
|
|
53
|
+
avatar={<Skeleton className="mt-0.5 size-9 shrink-0 rounded-full" />}
|
|
54
|
+
sender={<Skeleton className="h-3.5 w-40" />}
|
|
55
|
+
date={<Skeleton className="h-3 w-12" />}
|
|
56
|
+
actions={<ActionsPlaceholder />}
|
|
57
|
+
recipients={
|
|
58
|
+
<div className="-mt-0.5 flex h-4 items-center">
|
|
59
|
+
<Skeleton className="h-3 w-56 max-w-full" />
|
|
60
|
+
</div>
|
|
61
|
+
}
|
|
62
|
+
>
|
|
63
|
+
<div className={messageBodyColumnClassName}>
|
|
64
|
+
<BodySkeleton />
|
|
65
|
+
</div>
|
|
66
|
+
</ExpandedMessageFrame>
|
|
67
|
+
</div>
|
|
68
|
+
);
|
|
16
69
|
}
|
|
17
70
|
|
|
18
71
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
72
|
+
* The conversation while it loads, in the reader's own layout: the subject,
|
|
73
|
+
* a place for each older message the first page shows, and the latest
|
|
74
|
+
* message's header filled from the list's row. Its body is the placeholder
|
|
75
|
+
* the message keeps until the body is laid out, so the header stays put as
|
|
76
|
+
* the conversation arrives.
|
|
22
77
|
*/
|
|
23
|
-
function
|
|
24
|
-
|
|
78
|
+
export function ConversationLoadingSkeleton({
|
|
79
|
+
summary,
|
|
80
|
+
mailbox,
|
|
81
|
+
placeholders,
|
|
82
|
+
}: {
|
|
83
|
+
summary?: ConversationSummary;
|
|
84
|
+
mailbox?: Mailbox;
|
|
85
|
+
/**
|
|
86
|
+
* Whether the placeholder bars show (see `useDelayedPending`); before,
|
|
87
|
+
* only what the row tells is drawn, in place.
|
|
88
|
+
*/
|
|
89
|
+
placeholders: boolean;
|
|
90
|
+
}) {
|
|
91
|
+
// A Drafts folder row is the draft, not the conversation's latest message.
|
|
92
|
+
const row = summary?.draftId === null ? summary : undefined;
|
|
93
|
+
// The first page holds the latest messages. Older ones show collapsed,
|
|
94
|
+
// unless unread; those are most often the latest ones.
|
|
95
|
+
const older = row ? Math.min(row.messageCount, MESSAGE_PAGE_SIZE) - 1 : 1;
|
|
96
|
+
|
|
97
|
+
const olderUnread = row
|
|
98
|
+
? Math.min(
|
|
99
|
+
older,
|
|
100
|
+
Math.max(row.unreadCount - (row.direction === "incoming" ? 1 : 0), 0)
|
|
101
|
+
)
|
|
102
|
+
: 0;
|
|
25
103
|
|
|
26
104
|
return (
|
|
27
105
|
<section
|
|
28
106
|
aria-label="Loading conversation"
|
|
29
107
|
aria-busy="true"
|
|
30
|
-
|
|
31
|
-
|
|
108
|
+
className={cn(
|
|
109
|
+
"mx-auto w-full max-w-[60rem] pb-10",
|
|
110
|
+
!placeholders && "[&_[data-slot=skeleton]]:invisible"
|
|
111
|
+
)}
|
|
32
112
|
>
|
|
33
|
-
|
|
34
|
-
<
|
|
35
|
-
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
</header>
|
|
43
|
-
<div className="border-border border-y px-4 pt-4 pb-5 sm:px-6">
|
|
44
|
-
<div className="flex items-start gap-3">
|
|
45
|
-
<SenderAvatar
|
|
46
|
-
name={sender}
|
|
47
|
-
logoUrl={summary.senderLogoUrl}
|
|
48
|
-
className="mt-0.5 size-9 rounded-full text-[12px]"
|
|
49
|
-
/>
|
|
50
|
-
<div className="flex min-h-7 min-w-0 flex-1 items-center gap-2">
|
|
51
|
-
<span className="min-w-0 flex-1 truncate text-[13px] font-semibold">
|
|
52
|
-
{sender}
|
|
53
|
-
</span>
|
|
54
|
-
<time
|
|
55
|
-
dateTime={summary.timelineAt}
|
|
56
|
-
className="text-muted-foreground shrink-0 text-xs tabular-nums"
|
|
57
|
-
>
|
|
58
|
-
{previewDate(summary.timelineAt)}
|
|
59
|
-
</time>
|
|
60
|
-
</div>
|
|
113
|
+
{row ? (
|
|
114
|
+
<ConversationHeading
|
|
115
|
+
subject={row.subject}
|
|
116
|
+
messageCount={row.messageCount}
|
|
117
|
+
/>
|
|
118
|
+
) : (
|
|
119
|
+
<div className="px-4 pt-5 pb-4 sm:px-6 sm:pt-6">
|
|
120
|
+
<Skeleton className="h-6 w-3/5 max-w-md" />
|
|
121
|
+
<Skeleton className="mt-2.5 h-3 w-48" />
|
|
61
122
|
</div>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
123
|
+
)}
|
|
124
|
+
{/* Each in a box of its own, as the reader places its messages. */}
|
|
125
|
+
<div className="border-border border-y *:contents">
|
|
126
|
+
{Array.from({ length: older - olderUnread }, (_, index) => (
|
|
127
|
+
<div key={`read-${index}`}>
|
|
128
|
+
<CollapsedMessagePlaceholder />
|
|
129
|
+
</div>
|
|
130
|
+
))}
|
|
131
|
+
{Array.from({ length: olderUnread }, (_, index) => (
|
|
132
|
+
<div key={`unread-${index}`}>
|
|
133
|
+
<ExpandedMessagePlaceholder />
|
|
71
134
|
</div>
|
|
135
|
+
))}
|
|
136
|
+
<div>
|
|
137
|
+
{row ? (
|
|
138
|
+
<LatestMessagePlaceholder summary={row} mailbox={mailbox} />
|
|
139
|
+
) : (
|
|
140
|
+
<ExpandedMessagePlaceholder />
|
|
141
|
+
)}
|
|
72
142
|
</div>
|
|
73
143
|
</div>
|
|
74
144
|
</section>
|
|
75
145
|
);
|
|
76
146
|
}
|
|
77
147
|
|
|
78
|
-
|
|
79
|
-
export function ConversationLoadingSkeleton({
|
|
148
|
+
function LatestMessagePlaceholder({
|
|
80
149
|
summary,
|
|
81
|
-
|
|
82
|
-
|
|
150
|
+
mailbox,
|
|
151
|
+
}: {
|
|
152
|
+
summary: ConversationRow;
|
|
153
|
+
mailbox?: Mailbox;
|
|
154
|
+
}) {
|
|
155
|
+
const sender = senderName(summary);
|
|
156
|
+
const outgoing = summary.direction === "outgoing";
|
|
83
157
|
|
|
84
158
|
return (
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
<
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
159
|
+
<div className={messageSectionClassName}>
|
|
160
|
+
{outgoing && <OutgoingMark />}
|
|
161
|
+
<ExpandedMessageFrame
|
|
162
|
+
avatar={
|
|
163
|
+
<HeaderAvatar sender={sender} logoUrl={summary.senderLogoUrl} />
|
|
164
|
+
}
|
|
165
|
+
sender={
|
|
166
|
+
<SenderLine
|
|
167
|
+
message={summary}
|
|
168
|
+
sender={sender}
|
|
169
|
+
own={isOwnAddress(summary.fromAddress, mailbox)}
|
|
170
|
+
/>
|
|
171
|
+
}
|
|
172
|
+
date={
|
|
173
|
+
<>
|
|
174
|
+
{outgoing && <DeliveryIndicator message={summary} />}
|
|
175
|
+
<HeaderDate value={summary.timelineAt} />
|
|
176
|
+
</>
|
|
177
|
+
}
|
|
178
|
+
actions={<ActionsPlaceholder />}
|
|
179
|
+
recipients={
|
|
180
|
+
<p className={recipientsLineClassName}>
|
|
181
|
+
<span className="truncate">
|
|
182
|
+
{recipientSummary(summary, mailbox)}
|
|
183
|
+
</span>
|
|
184
|
+
<ChevronDown className="size-3 shrink-0" />
|
|
185
|
+
</p>
|
|
186
|
+
}
|
|
187
|
+
>
|
|
188
|
+
<div className={messageBodyColumnClassName}>
|
|
189
|
+
<BodySkeleton />
|
|
115
190
|
</div>
|
|
116
|
-
</
|
|
117
|
-
</
|
|
191
|
+
</ExpandedMessageFrame>
|
|
192
|
+
</div>
|
|
118
193
|
);
|
|
119
194
|
}
|