@rapidmx/web-client 0.9.0 → 0.11.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 +373 -88
- package/apps/admin/_layout.tsx +8 -2
- package/apps/admin/index.tsx +7 -1
- package/apps/admin/ingest-queue/index.tsx +2 -1
- package/apps/admin/mailboxes/[uid].tsx +23 -10
- package/apps/admin/quarantine/index.tsx +2 -1
- package/apps/admin/signing-certificates/index.tsx +343 -0
- package/apps/escrow/_layout.tsx +8 -2
- package/apps/shared/appearance/AppearanceForm.tsx +392 -0
- package/apps/shared/appearance/AppearanceHead.tsx +49 -0
- package/apps/shared/appearance/AppearanceProvider.tsx +470 -0
- package/apps/shared/appearance/ColorField.tsx +107 -0
- package/apps/shared/appearance/appearanceCache.ts +106 -0
- package/apps/shared/appearance/appearanceContext.ts +77 -0
- package/apps/shared/appearance/bootScript.ts +35 -0
- package/apps/shared/appearance/color.ts +169 -0
- package/apps/shared/appearance/photo.ts +88 -0
- package/apps/shared/appearance/resolvedTheme.ts +67 -0
- package/apps/shared/appearance/theme.ts +355 -0
- package/apps/shared/auth/accountUrl.ts +9 -0
- package/apps/shared/auth/adminAccess.ts +99 -0
- package/apps/shared/components/admin/layout/AdminShell.tsx +22 -10
- package/apps/shared/components/admin/mailboxes/ShareAccessCard.tsx +107 -60
- package/apps/shared/components/admin/settings/BrandingForm.tsx +24 -0
- package/apps/shared/components/admin/settings/DomainDnsSetup.tsx +2 -1
- package/apps/shared/components/admin/settings/PluginsManager.tsx +228 -25
- package/apps/shared/components/admin/setup/SetupWizard.tsx +2 -1
- package/apps/shared/components/calendar/CalendarListSidebar.tsx +4 -5
- package/apps/shared/components/calendar/layout/CalendarShell.tsx +8 -2
- package/apps/shared/components/contacts/ContactForm.tsx +11 -5
- package/apps/shared/components/contacts/ContactsSidebar.tsx +5 -3
- package/apps/shared/components/contacts/ContactsToolbar.tsx +98 -115
- package/apps/shared/components/contacts/layout/ContactsShell.tsx +25 -8
- package/apps/shared/components/escrow/layout/EscrowShell.tsx +13 -6
- package/apps/shared/components/layout/AppShell.tsx +477 -288
- package/apps/shared/components/layout/BrandingChrome.tsx +200 -13
- package/apps/shared/components/layout/KeyEnrollmentGate.tsx +398 -389
- package/apps/shared/components/layout/MailboxProvisioning.tsx +168 -164
- package/apps/shared/components/layout/RailIcon.tsx +100 -0
- package/apps/shared/components/layout/ResponsiveToolbar.tsx +315 -0
- package/apps/shared/components/layout/ThemeSwitch.tsx +84 -0
- package/apps/shared/components/layout/UserMenu.tsx +372 -185
- package/apps/shared/components/mail/ConversationList.tsx +271 -262
- package/apps/shared/components/mail/ConversationThreadPane.tsx +147 -94
- package/apps/shared/components/mail/LazyReadingPane.tsx +113 -0
- package/apps/shared/components/mail/MailSelectionBar.tsx +227 -222
- package/apps/shared/components/mail/MessageDetailPane.tsx +1537 -1387
- package/apps/shared/components/mail/OutboxBadge.tsx +44 -0
- package/apps/shared/components/mail/OutboxRowStatus.tsx +31 -0
- package/apps/shared/components/mail/compose/ComposeContext.tsx +312 -160
- package/apps/shared/components/mail/compose/ComposeToolbar.tsx +422 -418
- package/apps/shared/components/mail/compose/ComposeWindow.tsx +1644 -1736
- package/apps/shared/components/mail/compose/ComposeWindowPlaceholder.tsx +111 -0
- package/apps/shared/components/mail/compose/RichTextEditor.tsx +147 -118
- package/apps/shared/components/mail/compose/composePerf.ts +46 -0
- package/apps/shared/components/mail/compose/encryptionRequirement.ts +86 -0
- package/apps/shared/components/mail/compose/quotedBody.ts +161 -100
- package/apps/shared/components/mail/layout/MailShell.tsx +490 -472
- package/apps/shared/components/mail/reading/EncryptedBody.tsx +65 -0
- package/apps/shared/components/mail/reading/EncryptedPreview.tsx +35 -0
- package/apps/shared/components/mail/reading/MessageBody.tsx +240 -0
- package/apps/shared/components/mail/reading/MessageCard.tsx +174 -0
- package/apps/shared/components/mail/reading/bodyContent.ts +100 -0
- package/apps/shared/components/mail/reading/bodyHtml.ts +298 -0
- package/apps/shared/components/mail/reading/color.ts +245 -0
- package/apps/shared/components/mail/reading/frameControl.ts +142 -0
- package/apps/shared/components/mail/reading/frameDocument.ts +123 -0
- package/apps/shared/components/mail/reading/safeDocument.ts +24 -0
- package/apps/shared/components/mail/reading/themeAdaptation.ts +221 -0
- package/apps/shared/components/mail/reading/themeSurface.ts +90 -0
- package/apps/shared/components/mail/reading/viewOriginal.ts +38 -0
- package/apps/shared/components/mail/unreadStyle.tsx +75 -0
- package/apps/shared/components/settings/SigningCertificateCard.tsx +344 -0
- package/apps/shared/components/settings/layout/SettingsShell.tsx +253 -240
- package/apps/shared/components/sharing/PrincipalPicker.tsx +145 -0
- package/apps/shared/components/tasks/TasksSidebar.tsx +5 -3
- package/apps/shared/components/tasks/layout/TasksShell.tsx +24 -8
- package/apps/shared/keyboard/GlobalShortcuts.tsx +51 -0
- package/apps/shared/keyboard/ShortcutProvider.tsx +62 -0
- package/apps/shared/keyboard/ShortcutsDialog.tsx +84 -0
- package/apps/shared/keyboard/dispatch.ts +124 -0
- package/apps/shared/keyboard/format.ts +89 -0
- package/apps/shared/keyboard/keymap.ts +114 -0
- package/apps/shared/keyboard/match.ts +44 -0
- package/apps/shared/keyboard/parse.ts +136 -0
- package/apps/shared/keyboard/platform.ts +34 -0
- package/apps/shared/keyboard/registry.ts +65 -0
- package/apps/shared/keyboard/targets.ts +79 -0
- package/apps/shared/keyboard/useShortcut.ts +50 -0
- package/apps/shared/keyboard/useShortcutProps.ts +17 -0
- package/apps/shared/mail/folderCounts.ts +308 -0
- package/apps/shared/mail/folderTree.ts +143 -0
- package/apps/shared/mail/listSnapshots.ts +87 -0
- package/apps/shared/mail/messageReadState.ts +85 -0
- package/apps/shared/mail/newMailNotifications.ts +183 -0
- package/apps/shared/mail/outbox/UnlockBridge.tsx +23 -0
- package/apps/shared/mail/outbox/composeBridge.ts +69 -0
- package/apps/shared/mail/outbox/outboxState.ts +88 -0
- package/apps/shared/mail/outbox/pendingSends.ts +146 -0
- package/apps/shared/mail/outbox/sendDecision.ts +157 -0
- package/apps/shared/mail/outbox/sendJob.ts +427 -0
- package/apps/shared/mail/outbox/sendOutcomes.ts +146 -0
- package/apps/shared/mail/outbox/sendState.ts +35 -0
- package/apps/shared/mail/outbox/useOutboxStatus.ts +61 -0
- package/apps/shared/mail/useMailConnection.ts +203 -0
- package/apps/shared/mail/useMailLiveUpdates.ts +277 -224
- package/apps/shared/mail/useMarkMessageRead.ts +47 -0
- package/apps/shared/mail/useNewMailNotifications.ts +178 -0
- package/apps/shared/mail/useUnreadTitle.ts +42 -0
- package/apps/shared/navigation/AppRouter.tsx +300 -0
- package/apps/shared/navigation/appHrefs.ts +23 -0
- package/apps/shared/navigation/frameContext.tsx +35 -0
- package/apps/shared/navigation/idle.ts +45 -0
- package/apps/shared/navigation/routerContext.tsx +83 -0
- package/apps/shared/navigation/routes.ts +72 -0
- package/apps/shared/notifications/NotificationCenter.tsx +215 -0
- package/apps/shared/notifications/NotificationHistoryDialog.tsx +90 -0
- package/apps/shared/notifications/apiErrors.ts +98 -0
- package/apps/shared/notifications/headerOffset.ts +35 -0
- package/apps/shared/notifications/pushStatus.ts +56 -0
- package/apps/shared/notifications/store.ts +549 -0
- package/apps/shared/notifications/systemErrors.ts +63 -0
- package/apps/shared/notifications/useNotifications.ts +41 -0
- package/apps/shared/search/LocalIndexLifecycle.tsx +114 -98
- package/apps/shared/signing/enrollmentStorage.ts +33 -0
- package/apps/shared/signing/enrollmentTracker.ts +385 -0
- package/apps/shared/signing/enrollmentView.ts +251 -0
- package/apps/shared/signing/signingInfo.ts +58 -0
- package/apps/shared/signing/useNow.ts +19 -0
- package/apps/shared/signing/useSigningEnrollmentWatcher.ts +90 -0
- package/apps/shared/styles/app.css +108 -10
- package/apps/www/_layout.tsx +8 -2
- package/apps/www/_routedPage.tsx +24 -0
- package/apps/www/_routes.ts +36 -0
- package/apps/www/calendar/index.tsx +64 -33
- package/apps/www/contacts/[uid].tsx +109 -107
- package/apps/www/contacts/index.tsx +62 -42
- package/apps/www/index.tsx +2291 -1917
- package/apps/www/messages/[uid].tsx +108 -101
- package/apps/www/settings/appearance/index.tsx +21 -0
- package/apps/www/settings/auto-reply/index.tsx +7 -8
- package/apps/www/settings/encryption/index.tsx +1287 -1249
- package/apps/www/settings/filters/[uid].tsx +7 -2
- package/apps/www/settings/filters/index.tsx +102 -99
- package/apps/www/settings/filters/new/index.tsx +140 -133
- package/apps/www/settings/labels/index.tsx +204 -201
- package/apps/www/settings/privacy/index.tsx +7 -9
- package/apps/www/settings/read-receipts/index.tsx +7 -8
- package/apps/www/settings/sharing/index.tsx +256 -274
- package/apps/www/settings/signatures/[uid].tsx +172 -167
- package/apps/www/settings/signatures/index.tsx +88 -85
- package/apps/www/settings/signatures/new/index.tsx +135 -129
- package/apps/www/tasks/index.tsx +29 -18
- package/dist/apps/admin/_layout.d.ts +5 -1
- package/dist/apps/admin/_layout.js +3 -2
- package/dist/apps/admin/index.js +3 -2
- package/dist/apps/admin/ingest-queue/index.js +2 -1
- package/dist/apps/admin/mailboxes/[uid].js +9 -6
- package/dist/apps/admin/quarantine/index.js +2 -1
- package/dist/apps/admin/signing-certificates/index.d.ts +3 -0
- package/dist/apps/admin/signing-certificates/index.js +161 -0
- package/dist/apps/escrow/_layout.d.ts +5 -1
- package/dist/apps/escrow/_layout.js +3 -2
- package/dist/apps/shared/appearance/AppearanceForm.d.ts +7 -0
- package/dist/apps/shared/appearance/AppearanceForm.js +131 -0
- package/dist/apps/shared/appearance/AppearanceHead.d.ts +15 -0
- package/dist/apps/shared/appearance/AppearanceHead.js +31 -0
- package/dist/apps/shared/appearance/AppearanceProvider.d.ts +32 -0
- package/dist/apps/shared/appearance/AppearanceProvider.js +390 -0
- package/dist/apps/shared/appearance/ColorField.d.ts +22 -0
- package/dist/apps/shared/appearance/ColorField.js +40 -0
- package/dist/apps/shared/appearance/appearanceCache.d.ts +45 -0
- package/dist/apps/shared/appearance/appearanceCache.js +80 -0
- package/dist/apps/shared/appearance/appearanceContext.d.ts +45 -0
- package/dist/apps/shared/appearance/appearanceContext.js +29 -0
- package/dist/apps/shared/appearance/bootScript.d.ts +16 -0
- package/dist/apps/shared/appearance/bootScript.js +33 -0
- package/dist/apps/shared/appearance/color.d.ts +65 -0
- package/dist/apps/shared/appearance/color.js +132 -0
- package/dist/apps/shared/appearance/photo.d.ts +17 -0
- package/dist/apps/shared/appearance/photo.js +79 -0
- package/dist/apps/shared/appearance/resolvedTheme.d.ts +21 -0
- package/dist/apps/shared/appearance/resolvedTheme.js +55 -0
- package/dist/apps/shared/appearance/theme.d.ts +111 -0
- package/dist/apps/shared/appearance/theme.js +251 -0
- package/dist/apps/shared/auth/accountUrl.d.ts +2 -0
- package/dist/apps/shared/auth/accountUrl.js +8 -0
- package/dist/apps/shared/auth/adminAccess.d.ts +30 -0
- package/dist/apps/shared/auth/adminAccess.js +89 -0
- package/dist/apps/shared/components/admin/layout/AdminShell.d.ts +1 -1
- package/dist/apps/shared/components/admin/layout/AdminShell.js +16 -6
- package/dist/apps/shared/components/admin/mailboxes/ShareAccessCard.d.ts +10 -5
- package/dist/apps/shared/components/admin/mailboxes/ShareAccessCard.js +49 -34
- package/dist/apps/shared/components/admin/settings/BrandingForm.d.ts +2 -0
- package/dist/apps/shared/components/admin/settings/BrandingForm.js +7 -1
- package/dist/apps/shared/components/admin/settings/DomainDnsSetup.js +1 -1
- package/dist/apps/shared/components/admin/settings/PluginsManager.js +106 -20
- package/dist/apps/shared/components/admin/setup/SetupWizard.js +2 -1
- package/dist/apps/shared/components/calendar/CalendarListSidebar.js +8 -8
- package/dist/apps/shared/components/calendar/layout/CalendarShell.d.ts +1 -1
- package/dist/apps/shared/components/calendar/layout/CalendarShell.js +8 -4
- package/dist/apps/shared/components/contacts/ContactForm.js +1 -1
- package/dist/apps/shared/components/contacts/ContactsSidebar.js +4 -2
- package/dist/apps/shared/components/contacts/ContactsToolbar.d.ts +6 -2
- package/dist/apps/shared/components/contacts/ContactsToolbar.js +28 -10
- package/dist/apps/shared/components/contacts/layout/ContactsShell.d.ts +1 -1
- package/dist/apps/shared/components/contacts/layout/ContactsShell.js +19 -6
- package/dist/apps/shared/components/escrow/layout/EscrowShell.js +7 -4
- package/dist/apps/shared/components/layout/AppShell.d.ts +34 -4
- package/dist/apps/shared/components/layout/AppShell.js +122 -17
- package/dist/apps/shared/components/layout/BrandingChrome.d.ts +69 -10
- package/dist/apps/shared/components/layout/BrandingChrome.js +140 -12
- package/dist/apps/shared/components/layout/KeyEnrollmentGate.js +10 -9
- package/dist/apps/shared/components/layout/MailboxProvisioning.js +3 -1
- package/dist/apps/shared/components/layout/RailIcon.d.ts +21 -0
- package/dist/apps/shared/components/layout/RailIcon.js +85 -0
- package/dist/apps/shared/components/layout/ResponsiveToolbar.d.ts +55 -0
- package/dist/apps/shared/components/layout/ResponsiveToolbar.js +199 -0
- package/dist/apps/shared/components/layout/ThemeSwitch.d.ts +9 -0
- package/dist/apps/shared/components/layout/ThemeSwitch.js +54 -0
- package/dist/apps/shared/components/layout/UserMenu.d.ts +25 -3
- package/dist/apps/shared/components/layout/UserMenu.js +88 -7
- package/dist/apps/shared/components/mail/ConversationList.js +5 -11
- package/dist/apps/shared/components/mail/ConversationThreadPane.d.ts +6 -2
- package/dist/apps/shared/components/mail/ConversationThreadPane.js +87 -40
- package/dist/apps/shared/components/mail/LazyReadingPane.d.ts +9 -0
- package/dist/apps/shared/components/mail/LazyReadingPane.js +83 -0
- package/dist/apps/shared/components/mail/MailSelectionBar.d.ts +6 -4
- package/dist/apps/shared/components/mail/MailSelectionBar.js +11 -4
- package/dist/apps/shared/components/mail/MessageDetailPane.d.ts +25 -8
- package/dist/apps/shared/components/mail/MessageDetailPane.js +167 -73
- package/dist/apps/shared/components/mail/OutboxBadge.d.ts +17 -0
- package/dist/apps/shared/components/mail/OutboxBadge.js +18 -0
- package/dist/apps/shared/components/mail/OutboxRowStatus.d.ts +10 -0
- package/dist/apps/shared/components/mail/OutboxRowStatus.js +19 -0
- package/dist/apps/shared/components/mail/compose/ComposeContext.d.ts +38 -0
- package/dist/apps/shared/components/mail/compose/ComposeContext.js +97 -6
- package/dist/apps/shared/components/mail/compose/ComposeToolbar.js +4 -3
- package/dist/apps/shared/components/mail/compose/ComposeWindow.d.ts +3 -2
- package/dist/apps/shared/components/mail/compose/ComposeWindow.js +316 -339
- package/dist/apps/shared/components/mail/compose/ComposeWindowPlaceholder.d.ts +19 -0
- package/dist/apps/shared/components/mail/compose/ComposeWindowPlaceholder.js +33 -0
- package/dist/apps/shared/components/mail/compose/RichTextEditor.d.ts +9 -1
- package/dist/apps/shared/components/mail/compose/RichTextEditor.js +20 -2
- package/dist/apps/shared/components/mail/compose/composePerf.d.ts +16 -0
- package/dist/apps/shared/components/mail/compose/composePerf.js +41 -0
- package/dist/apps/shared/components/mail/compose/encryptionRequirement.d.ts +49 -0
- package/dist/apps/shared/components/mail/compose/encryptionRequirement.js +35 -0
- package/dist/apps/shared/components/mail/compose/quotedBody.d.ts +13 -0
- package/dist/apps/shared/components/mail/compose/quotedBody.js +67 -11
- package/dist/apps/shared/components/mail/layout/MailShell.d.ts +14 -4
- package/dist/apps/shared/components/mail/layout/MailShell.js +90 -104
- package/dist/apps/shared/components/mail/reading/EncryptedBody.d.ts +21 -0
- package/dist/apps/shared/components/mail/reading/EncryptedBody.js +22 -0
- package/dist/apps/shared/components/mail/reading/EncryptedPreview.d.ts +18 -0
- package/dist/apps/shared/components/mail/reading/EncryptedPreview.js +22 -0
- package/dist/apps/shared/components/mail/reading/MessageBody.d.ts +32 -0
- package/dist/apps/shared/components/mail/reading/MessageBody.js +136 -0
- package/dist/apps/shared/components/mail/reading/MessageCard.d.ts +62 -0
- package/dist/apps/shared/components/mail/reading/MessageCard.js +58 -0
- package/dist/apps/shared/components/mail/reading/bodyContent.d.ts +38 -0
- package/dist/apps/shared/components/mail/reading/bodyContent.js +84 -0
- package/dist/apps/shared/components/mail/reading/bodyHtml.d.ts +47 -0
- package/dist/apps/shared/components/mail/reading/bodyHtml.js +267 -0
- package/dist/apps/shared/components/mail/reading/color.d.ts +63 -0
- package/dist/apps/shared/components/mail/reading/color.js +201 -0
- package/dist/apps/shared/components/mail/reading/frameControl.d.ts +33 -0
- package/dist/apps/shared/components/mail/reading/frameControl.js +120 -0
- package/dist/apps/shared/components/mail/reading/frameDocument.d.ts +52 -0
- package/dist/apps/shared/components/mail/reading/frameDocument.js +98 -0
- package/dist/apps/shared/components/mail/reading/safeDocument.d.ts +3 -0
- package/dist/apps/shared/components/mail/reading/safeDocument.js +12 -0
- package/dist/apps/shared/components/mail/reading/themeAdaptation.d.ts +56 -0
- package/dist/apps/shared/components/mail/reading/themeAdaptation.js +144 -0
- package/dist/apps/shared/components/mail/reading/themeSurface.d.ts +17 -0
- package/dist/apps/shared/components/mail/reading/themeSurface.js +83 -0
- package/dist/apps/shared/components/mail/reading/viewOriginal.d.ts +9 -0
- package/dist/apps/shared/components/mail/reading/viewOriginal.js +32 -0
- package/dist/apps/shared/components/mail/unreadStyle.d.ts +45 -0
- package/dist/apps/shared/components/mail/unreadStyle.js +61 -0
- package/dist/apps/shared/components/settings/SigningCertificateCard.d.ts +32 -0
- package/dist/apps/shared/components/settings/SigningCertificateCard.js +98 -0
- package/dist/apps/shared/components/settings/layout/SettingsShell.d.ts +1 -1
- package/dist/apps/shared/components/settings/layout/SettingsShell.js +16 -5
- package/dist/apps/shared/components/sharing/PrincipalPicker.d.ts +26 -0
- package/dist/apps/shared/components/sharing/PrincipalPicker.js +77 -0
- package/dist/apps/shared/components/tasks/TasksSidebar.js +4 -2
- package/dist/apps/shared/components/tasks/layout/TasksShell.d.ts +1 -1
- package/dist/apps/shared/components/tasks/layout/TasksShell.js +18 -6
- package/dist/apps/shared/keyboard/GlobalShortcuts.d.ts +14 -0
- package/dist/apps/shared/keyboard/GlobalShortcuts.js +37 -0
- package/dist/apps/shared/keyboard/ShortcutProvider.d.ts +20 -0
- package/dist/apps/shared/keyboard/ShortcutProvider.js +52 -0
- package/dist/apps/shared/keyboard/ShortcutsDialog.d.ts +14 -0
- package/dist/apps/shared/keyboard/ShortcutsDialog.js +42 -0
- package/dist/apps/shared/keyboard/dispatch.d.ts +16 -0
- package/dist/apps/shared/keyboard/dispatch.js +109 -0
- package/dist/apps/shared/keyboard/format.d.ts +12 -0
- package/dist/apps/shared/keyboard/format.js +74 -0
- package/dist/apps/shared/keyboard/keymap.d.ts +294 -0
- package/dist/apps/shared/keyboard/keymap.js +84 -0
- package/dist/apps/shared/keyboard/match.d.ts +20 -0
- package/dist/apps/shared/keyboard/match.js +31 -0
- package/dist/apps/shared/keyboard/parse.d.ts +31 -0
- package/dist/apps/shared/keyboard/parse.js +107 -0
- package/dist/apps/shared/keyboard/platform.d.ts +15 -0
- package/dist/apps/shared/keyboard/platform.js +22 -0
- package/dist/apps/shared/keyboard/registry.d.ts +39 -0
- package/dist/apps/shared/keyboard/registry.js +33 -0
- package/dist/apps/shared/keyboard/targets.d.ts +14 -0
- package/dist/apps/shared/keyboard/targets.js +67 -0
- package/dist/apps/shared/keyboard/useShortcut.d.ts +19 -0
- package/dist/apps/shared/keyboard/useShortcut.js +35 -0
- package/dist/apps/shared/keyboard/useShortcutProps.d.ts +10 -0
- package/dist/apps/shared/keyboard/useShortcutProps.js +15 -0
- package/dist/apps/shared/mail/folderCounts.d.ts +78 -0
- package/dist/apps/shared/mail/folderCounts.js +218 -0
- package/dist/apps/shared/mail/folderTree.d.ts +55 -0
- package/dist/apps/shared/mail/folderTree.js +116 -0
- package/dist/apps/shared/mail/listSnapshots.d.ts +46 -0
- package/dist/apps/shared/mail/listSnapshots.js +43 -0
- package/dist/apps/shared/mail/messageReadState.d.ts +32 -0
- package/dist/apps/shared/mail/messageReadState.js +63 -0
- package/dist/apps/shared/mail/newMailNotifications.d.ts +62 -0
- package/dist/apps/shared/mail/newMailNotifications.js +138 -0
- package/dist/apps/shared/mail/outbox/UnlockBridge.d.ts +5 -0
- package/dist/apps/shared/mail/outbox/UnlockBridge.js +18 -0
- package/dist/apps/shared/mail/outbox/composeBridge.d.ts +34 -0
- package/dist/apps/shared/mail/outbox/composeBridge.js +32 -0
- package/dist/apps/shared/mail/outbox/outboxState.d.ts +41 -0
- package/dist/apps/shared/mail/outbox/outboxState.js +42 -0
- package/dist/apps/shared/mail/outbox/pendingSends.d.ts +39 -0
- package/dist/apps/shared/mail/outbox/pendingSends.js +109 -0
- package/dist/apps/shared/mail/outbox/sendDecision.d.ts +80 -0
- package/dist/apps/shared/mail/outbox/sendDecision.js +94 -0
- package/dist/apps/shared/mail/outbox/sendJob.d.ts +68 -0
- package/dist/apps/shared/mail/outbox/sendJob.js +319 -0
- package/dist/apps/shared/mail/outbox/sendOutcomes.d.ts +3 -0
- package/dist/apps/shared/mail/outbox/sendOutcomes.js +141 -0
- package/dist/apps/shared/mail/outbox/sendState.d.ts +25 -0
- package/dist/apps/shared/mail/outbox/sendState.js +8 -0
- package/dist/apps/shared/mail/outbox/useOutboxStatus.d.ts +11 -0
- package/dist/apps/shared/mail/outbox/useOutboxStatus.js +49 -0
- package/dist/apps/shared/mail/useMailConnection.d.ts +56 -0
- package/dist/apps/shared/mail/useMailConnection.js +138 -0
- package/dist/apps/shared/mail/useMailLiveUpdates.d.ts +29 -9
- package/dist/apps/shared/mail/useMailLiveUpdates.js +60 -32
- package/dist/apps/shared/mail/useMarkMessageRead.d.ts +12 -0
- package/dist/apps/shared/mail/useMarkMessageRead.js +44 -0
- package/dist/apps/shared/mail/useNewMailNotifications.d.ts +35 -0
- package/dist/apps/shared/mail/useNewMailNotifications.js +130 -0
- package/dist/apps/shared/mail/useUnreadTitle.d.ts +18 -0
- package/dist/apps/shared/mail/useUnreadTitle.js +31 -0
- package/dist/apps/shared/navigation/AppRouter.d.ts +52 -0
- package/dist/apps/shared/navigation/AppRouter.js +242 -0
- package/dist/apps/shared/navigation/appHrefs.d.ts +14 -0
- package/dist/apps/shared/navigation/appHrefs.js +20 -0
- package/dist/apps/shared/navigation/frameContext.d.ts +19 -0
- package/dist/apps/shared/navigation/frameContext.js +24 -0
- package/dist/apps/shared/navigation/idle.d.ts +14 -0
- package/dist/apps/shared/navigation/idle.js +43 -0
- package/dist/apps/shared/navigation/routerContext.d.ts +37 -0
- package/dist/apps/shared/navigation/routerContext.js +56 -0
- package/dist/apps/shared/navigation/routes.d.ts +32 -0
- package/dist/apps/shared/navigation/routes.js +37 -0
- package/dist/apps/shared/notifications/NotificationCenter.d.ts +19 -0
- package/dist/apps/shared/notifications/NotificationCenter.js +90 -0
- package/dist/apps/shared/notifications/NotificationHistoryDialog.d.ts +10 -0
- package/dist/apps/shared/notifications/NotificationHistoryDialog.js +36 -0
- package/dist/apps/shared/notifications/apiErrors.d.ts +19 -0
- package/dist/apps/shared/notifications/apiErrors.js +86 -0
- package/dist/apps/shared/notifications/headerOffset.d.ts +8 -0
- package/dist/apps/shared/notifications/headerOffset.js +33 -0
- package/dist/apps/shared/notifications/pushStatus.d.ts +9 -0
- package/dist/apps/shared/notifications/pushStatus.js +54 -0
- package/dist/apps/shared/notifications/store.d.ts +136 -0
- package/dist/apps/shared/notifications/store.js +416 -0
- package/dist/apps/shared/notifications/systemErrors.d.ts +9 -0
- package/dist/apps/shared/notifications/systemErrors.js +58 -0
- package/dist/apps/shared/notifications/useNotifications.d.ts +17 -0
- package/dist/apps/shared/notifications/useNotifications.js +18 -0
- package/dist/apps/shared/search/LocalIndexLifecycle.js +17 -3
- package/dist/apps/shared/signing/enrollmentStorage.d.ts +10 -0
- package/dist/apps/shared/signing/enrollmentStorage.js +33 -0
- package/dist/apps/shared/signing/enrollmentTracker.d.ts +73 -0
- package/dist/apps/shared/signing/enrollmentTracker.js +307 -0
- package/dist/apps/shared/signing/enrollmentView.d.ts +57 -0
- package/dist/apps/shared/signing/enrollmentView.js +214 -0
- package/dist/apps/shared/signing/signingInfo.d.ts +11 -0
- package/dist/apps/shared/signing/signingInfo.js +48 -0
- package/dist/apps/shared/signing/useNow.d.ts +2 -0
- package/dist/apps/shared/signing/useNow.js +18 -0
- package/dist/apps/shared/signing/useSigningEnrollmentWatcher.d.ts +16 -0
- package/dist/apps/shared/signing/useSigningEnrollmentWatcher.js +87 -0
- package/dist/apps/shared/styles/app.css +108 -10
- package/dist/apps/www/_layout.d.ts +5 -1
- package/dist/apps/www/_layout.js +3 -2
- package/dist/apps/www/_routedPage.d.ts +12 -0
- package/dist/apps/www/_routedPage.js +19 -0
- package/dist/apps/www/_routes.d.ts +11 -0
- package/dist/apps/www/_routes.js +30 -0
- package/dist/apps/www/calendar/index.d.ts +2 -2
- package/dist/apps/www/calendar/index.js +41 -11
- package/dist/apps/www/contacts/[uid].d.ts +3 -9
- package/dist/apps/www/contacts/[uid].js +11 -9
- package/dist/apps/www/contacts/index.d.ts +2 -2
- package/dist/apps/www/contacts/index.js +30 -24
- package/dist/apps/www/index.d.ts +2 -2
- package/dist/apps/www/index.js +332 -48
- package/dist/apps/www/messages/[uid].d.ts +3 -7
- package/dist/apps/www/messages/[uid].js +10 -5
- package/dist/apps/www/settings/appearance/index.d.ts +4 -0
- package/dist/apps/www/settings/appearance/index.js +13 -0
- package/dist/apps/www/settings/auto-reply/index.d.ts +2 -2
- package/dist/apps/www/settings/auto-reply/index.js +6 -7
- package/dist/apps/www/settings/encryption/index.d.ts +2 -2
- package/dist/apps/www/settings/encryption/index.js +106 -96
- package/dist/apps/www/settings/filters/[uid].d.ts +2 -2
- package/dist/apps/www/settings/filters/[uid].js +6 -2
- package/dist/apps/www/settings/filters/index.d.ts +2 -2
- package/dist/apps/www/settings/filters/index.js +3 -1
- package/dist/apps/www/settings/filters/new/index.d.ts +2 -2
- package/dist/apps/www/settings/filters/new/index.js +9 -3
- package/dist/apps/www/settings/labels/index.d.ts +2 -2
- package/dist/apps/www/settings/labels/index.js +3 -1
- package/dist/apps/www/settings/privacy/index.d.ts +2 -2
- package/dist/apps/www/settings/privacy/index.js +8 -9
- package/dist/apps/www/settings/read-receipts/index.d.ts +2 -2
- package/dist/apps/www/settings/read-receipts/index.js +6 -7
- package/dist/apps/www/settings/sharing/index.d.ts +2 -2
- package/dist/apps/www/settings/sharing/index.js +22 -34
- package/dist/apps/www/settings/signatures/[uid].d.ts +2 -2
- package/dist/apps/www/settings/signatures/[uid].js +6 -2
- package/dist/apps/www/settings/signatures/index.d.ts +2 -2
- package/dist/apps/www/settings/signatures/index.js +3 -1
- package/dist/apps/www/settings/signatures/new/index.d.ts +2 -2
- package/dist/apps/www/settings/signatures/new/index.js +9 -4
- package/dist/apps/www/tasks/index.d.ts +2 -2
- package/dist/apps/www/tasks/index.js +22 -16
- package/package.json +2 -2
- package/apps/shared/components/mail/compose/SendFailureAlert.tsx +0 -48
- package/dist/apps/shared/components/mail/compose/SendFailureAlert.d.ts +0 -14
- package/dist/apps/shared/components/mail/compose/SendFailureAlert.js +0 -11
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
3
3
|
// SPDX-License-Identifier: MPL-2.0
|
|
4
4
|
///////////////////////////////////////////////////////////////////////////////
|
|
5
|
-
import
|
|
5
|
+
import { routedPage } from "../_routedPage.js";
|
|
6
|
+
import { useNavigate } from "../../shared/navigation/AppRouter.js";
|
|
7
|
+
import React, { useEffect, useMemo, useRef, useState } from "react";
|
|
6
8
|
import { ApiRequestError } from "@rapidmx/react-shared/util/api.js";
|
|
7
9
|
import {
|
|
8
10
|
Contact,
|
|
@@ -29,11 +31,14 @@ import Button from "@rapidmx/react-shared/components/buttons/Button.js";
|
|
|
29
31
|
import Modal from "@rapidmx/react-shared/components/overlays/Modal.js";
|
|
30
32
|
import { LIST_PAGE_SIZE, MAX_LIST_PAGES, listAllPages } from "../../shared/mail/listAllPages.js";
|
|
31
33
|
import { clearPinnedSignerCache } from "../../shared/components/mail/pinnedSigners.js";
|
|
34
|
+
import { SHORTCUTS } from "../../shared/keyboard/keymap.js";
|
|
35
|
+
import { useShortcut } from "../../shared/keyboard/useShortcut.js";
|
|
36
|
+
import { notifyApiError } from "../../shared/notifications/apiErrors.js";
|
|
32
37
|
|
|
33
38
|
const INPUT_CLASS =
|
|
34
39
|
"w-full text-sm py-2 px-3 border border-border rounded-sm bg-surface text-text focus:outline-none focus:border-primary";
|
|
35
40
|
|
|
36
|
-
|
|
41
|
+
function ContactsPage(props: ContactsShellProps) {
|
|
37
42
|
return (
|
|
38
43
|
<ContactsShell {...props}>
|
|
39
44
|
<ContactsContent userUid={props.userUid} />
|
|
@@ -73,6 +78,7 @@ function ContactsContent({ userUid }: { userUid?: string }) {
|
|
|
73
78
|
const writableMailboxes = useWritableMailboxes(mailboxes, userUid, mailboxUid);
|
|
74
79
|
const { openCompose } = useCompose();
|
|
75
80
|
const isMobile = useIsMobile();
|
|
81
|
+
const navigate = useNavigate();
|
|
76
82
|
const [contacts, setContacts] = useState<Contact[]>([]);
|
|
77
83
|
const [deletedContacts, setDeletedContacts] = useState<Contact[]>([]);
|
|
78
84
|
const [deletedLoading, setDeletedLoading] = useState(false);
|
|
@@ -93,10 +99,9 @@ function ContactsContent({ userUid }: { userUid?: string }) {
|
|
|
93
99
|
const [savedElsewhere, setSavedElsewhere] = useState<{ mailboxUid: string; displayName: string } | null>(null);
|
|
94
100
|
const [confirmingBulkDelete, setConfirmingBulkDelete] = useState(false);
|
|
95
101
|
|
|
96
|
-
/** Returns a promise so bulk actions (below) can wait for the refreshed list
|
|
97
|
-
*
|
|
98
|
-
* which
|
|
99
|
-
* ever saw it, since every bulk handler calls this right after its own error-setting loop. */
|
|
102
|
+
/** Returns a promise so bulk actions (below) can wait for the refreshed list. `error` is only this list's own
|
|
103
|
+
* load failure (cleared first, for a fresh fetch attempt); a failed action is a pop-up instead
|
|
104
|
+
* (`notifyApiError()`), which a reload doesn't touch. */
|
|
100
105
|
function reload(): Promise<void> {
|
|
101
106
|
if (!folderUid) {
|
|
102
107
|
setContacts([]);
|
|
@@ -248,7 +253,7 @@ function ContactsContent({ userUid }: { userUid?: string }) {
|
|
|
248
253
|
|
|
249
254
|
function handleSelectRow(contact: Contact) {
|
|
250
255
|
if (isMobile) {
|
|
251
|
-
|
|
256
|
+
navigate(`/contacts/${encodeURIComponent(contact.uid)}`);
|
|
252
257
|
return;
|
|
253
258
|
}
|
|
254
259
|
setSelectedUid(contact.uid);
|
|
@@ -260,6 +265,14 @@ function ContactsContent({ userUid }: { userUid?: string }) {
|
|
|
260
265
|
setMode("new");
|
|
261
266
|
}
|
|
262
267
|
|
|
268
|
+
// Keyboard shortcuts - the toolbar's New contact and the search box. (A dialog open silences them.)
|
|
269
|
+
const searchInputRef = useRef<HTMLInputElement | null>(null);
|
|
270
|
+
useShortcut(SHORTCUTS.contacts.create, handleNew);
|
|
271
|
+
useShortcut(SHORTCUTS.contacts.search, () => {
|
|
272
|
+
searchInputRef.current?.focus();
|
|
273
|
+
searchInputRef.current?.select();
|
|
274
|
+
});
|
|
275
|
+
|
|
263
276
|
function handleSaved(contact: Contact) {
|
|
264
277
|
setMode("view");
|
|
265
278
|
if (contact.mailboxUid !== mailboxUid) {
|
|
@@ -286,24 +299,23 @@ function ContactsContent({ userUid }: { userUid?: string }) {
|
|
|
286
299
|
setMode("view");
|
|
287
300
|
void reload();
|
|
288
301
|
} catch (err) {
|
|
289
|
-
|
|
302
|
+
notifyApiError(err, "Couldn't delete the contact");
|
|
290
303
|
}
|
|
291
304
|
}
|
|
292
305
|
|
|
306
|
+
// The bulk handlers below try every contact and report each failure: the same failure repeated is one pop-up with a count.
|
|
293
307
|
async function handleBulkDelete() {
|
|
294
308
|
setConfirmingBulkDelete(false);
|
|
295
|
-
let bulkError: string | null = null;
|
|
296
309
|
for (const contact of checkedContacts) {
|
|
297
310
|
try {
|
|
298
311
|
await deleteContact(contact.uid, contact.version);
|
|
299
312
|
} catch (err) {
|
|
300
|
-
|
|
313
|
+
notifyApiError(err, "Couldn't delete some of the contacts");
|
|
301
314
|
}
|
|
302
315
|
}
|
|
303
316
|
clearPinnedSignerCache();
|
|
304
317
|
setCheckedUids(new Set());
|
|
305
318
|
await reload();
|
|
306
|
-
setError(bulkError);
|
|
307
319
|
}
|
|
308
320
|
|
|
309
321
|
// `ContactsToolbar`'s Edit button — the only caller — is itself `disabled` unless exactly one contact
|
|
@@ -324,17 +336,15 @@ function ContactsContent({ userUid }: { userUid?: string }) {
|
|
|
324
336
|
|
|
325
337
|
async function handleToggleFavorite() {
|
|
326
338
|
const allFavorited = checkedContacts.every((c) => c.favorite);
|
|
327
|
-
let bulkError: string | null = null;
|
|
328
339
|
for (const contact of checkedContacts) {
|
|
329
340
|
try {
|
|
330
341
|
await setContactFavorite(contact, !allFavorited);
|
|
331
342
|
} catch (err) {
|
|
332
|
-
|
|
343
|
+
notifyApiError(err, "Couldn't update some of the contacts");
|
|
333
344
|
}
|
|
334
345
|
}
|
|
335
346
|
clearPinnedSignerCache();
|
|
336
347
|
await reload();
|
|
337
|
-
setError(bulkError);
|
|
338
348
|
}
|
|
339
349
|
|
|
340
350
|
async function handleAddCategory() {
|
|
@@ -342,7 +352,6 @@ function ContactsContent({ userUid }: { userUid?: string }) {
|
|
|
342
352
|
if (!category?.trim()) {
|
|
343
353
|
return;
|
|
344
354
|
}
|
|
345
|
-
let bulkError: string | null = null;
|
|
346
355
|
for (const contact of checkedContacts) {
|
|
347
356
|
const categories = Array.from(new Set([...(contact.categories ?? []), category.trim()]));
|
|
348
357
|
try {
|
|
@@ -350,12 +359,11 @@ function ContactsContent({ userUid }: { userUid?: string }) {
|
|
|
350
359
|
// fields restapi rejects, and would overwrite any concurrent edit to the other fields.
|
|
351
360
|
await updateContact({ uid: contact.uid, version: contact.version, categories });
|
|
352
361
|
} catch (err) {
|
|
353
|
-
|
|
362
|
+
notifyApiError(err, "Couldn't update some of the contacts");
|
|
354
363
|
}
|
|
355
364
|
}
|
|
356
365
|
clearPinnedSignerCache();
|
|
357
366
|
await reload();
|
|
358
|
-
setError(bulkError);
|
|
359
367
|
}
|
|
360
368
|
|
|
361
369
|
function handleExportVCard() {
|
|
@@ -371,28 +379,31 @@ function ContactsContent({ userUid }: { userUid?: string }) {
|
|
|
371
379
|
}
|
|
372
380
|
const text = await file.text();
|
|
373
381
|
const parsed = parseVCards(text);
|
|
374
|
-
let bulkError: string | null = null;
|
|
375
382
|
for (const input of parsed) {
|
|
376
383
|
try {
|
|
377
384
|
await createContact({ mailboxUid, folderUid, ...input });
|
|
378
385
|
} catch (err) {
|
|
379
|
-
|
|
386
|
+
notifyApiError(err, "Couldn't import some of the contacts");
|
|
380
387
|
}
|
|
381
388
|
}
|
|
382
389
|
clearPinnedSignerCache();
|
|
383
390
|
await reload();
|
|
384
|
-
setError(bulkError);
|
|
385
391
|
}
|
|
386
392
|
|
|
387
393
|
return (
|
|
388
|
-
|
|
394
|
+
// From `md` up the page is exactly as tall as the window under the title bar and every column scrolls by itself (the frame's own height is
|
|
395
|
+
// open-ended, so a column's `overflow` would otherwise never apply); on a phone the whole page scrolls, as it always did. Below `lg` the
|
|
396
|
+
// contacts menu is a drawer (a button above the columns), so the list and the detail pane keep a usable width.
|
|
397
|
+
<div className="flex-1 min-w-0 min-h-0 flex flex-col lg:flex-row md:flex-none md:h-[calc(100dvh_-_var(--rr-header-h,4rem))] md:overflow-hidden">
|
|
389
398
|
<ContactsSidebar mailboxUid={mailboxUid} contacts={contacts} active={view} onSelect={handleSelectView} showDeleted={canViewDeleted} />
|
|
399
|
+
<div className="flex-1 min-w-0 min-h-0 flex">
|
|
390
400
|
{/* Hidden on mobile while the "new contact" form (the one form-pane state mobile keeps
|
|
391
401
|
in-place — see the pane's own comment below) is showing, so the two never compete for the
|
|
392
|
-
same row's width. Desktop always shows both side by side,
|
|
402
|
+
same row's width. Desktop always shows both side by side. A sensible width for the list - a third of the window, between 16 and
|
|
403
|
+
26 rem - so the detail pane keeps the rest, and its toolbar fits it (`ResponsiveToolbar`). */}
|
|
393
404
|
<div
|
|
394
405
|
className={[
|
|
395
|
-
"w-full md:w-
|
|
406
|
+
"w-full md:w-[clamp(16rem,32vw,26rem)] min-w-0 md:shrink-0 md:border-r border-border md:flex flex-col min-h-0",
|
|
396
407
|
mode === "new" ? "hidden md:flex" : "flex",
|
|
397
408
|
].join(" ")}
|
|
398
409
|
>
|
|
@@ -407,9 +418,11 @@ function ContactsContent({ userUid }: { userUid?: string }) {
|
|
|
407
418
|
onAddCategory={handleAddCategory}
|
|
408
419
|
onExportVCard={handleExportVCard}
|
|
409
420
|
onImportFile={handleImportFile}
|
|
421
|
+
shortcuts
|
|
410
422
|
/>
|
|
411
423
|
<div className="p-3 border-b border-border">
|
|
412
424
|
<input
|
|
425
|
+
ref={searchInputRef}
|
|
413
426
|
type="search"
|
|
414
427
|
value={query}
|
|
415
428
|
onChange={(e) => setQuery(e.target.value)}
|
|
@@ -441,12 +454,12 @@ function ContactsContent({ userUid }: { userUid?: string }) {
|
|
|
441
454
|
) : sorted.length === 0 ? (
|
|
442
455
|
<p className="p-4 text-sm text-text-muted">No contacts found.</p>
|
|
443
456
|
) : (
|
|
444
|
-
<div className="flex-1 overflow-auto">
|
|
445
|
-
<table className="w-full text-sm">
|
|
457
|
+
<div className="flex-1 min-h-0 overflow-auto">
|
|
458
|
+
<table className="w-full table-fixed text-sm">
|
|
446
459
|
<thead>
|
|
447
460
|
<tr className="border-b border-border text-left">
|
|
448
461
|
{!isDeletedView && (
|
|
449
|
-
<th className="w-
|
|
462
|
+
<th className="w-10 px-3 py-2">
|
|
450
463
|
<input
|
|
451
464
|
type="checkbox"
|
|
452
465
|
aria-label="Select all contacts"
|
|
@@ -455,11 +468,11 @@ function ContactsContent({ userUid }: { userUid?: string }) {
|
|
|
455
468
|
/>
|
|
456
469
|
</th>
|
|
457
470
|
)}
|
|
458
|
-
<th className="px-3 py-2">
|
|
471
|
+
<th className="w-[58%] px-3 py-2">
|
|
459
472
|
<button
|
|
460
473
|
type="button"
|
|
461
474
|
onClick={() => handleSort("name")}
|
|
462
|
-
className="text-xs font-bold uppercase tracking-wide text-text-muted"
|
|
475
|
+
className="block max-w-full truncate text-xs font-bold uppercase tracking-wide text-text-muted"
|
|
463
476
|
>
|
|
464
477
|
Name{sortColumn === "name" ? (sortDesc ? " ▾" : " ▴") : ""}
|
|
465
478
|
</button>
|
|
@@ -468,7 +481,7 @@ function ContactsContent({ userUid }: { userUid?: string }) {
|
|
|
468
481
|
<button
|
|
469
482
|
type="button"
|
|
470
483
|
onClick={() => handleSort("info")}
|
|
471
|
-
className="text-xs font-bold uppercase tracking-wide text-text-muted"
|
|
484
|
+
className="block max-w-full truncate text-xs font-bold uppercase tracking-wide text-text-muted"
|
|
472
485
|
>
|
|
473
486
|
Contact info{sortColumn === "info" ? (sortDesc ? " ▾" : " ▴") : ""}
|
|
474
487
|
</button>
|
|
@@ -494,15 +507,15 @@ function ContactsContent({ userUid }: { userUid?: string }) {
|
|
|
494
507
|
</td>
|
|
495
508
|
)}
|
|
496
509
|
<td className="px-3 py-2">
|
|
497
|
-
<button type="button" onClick={() => handleSelectRow(contact)} className="flex items-center gap-2 text-left">
|
|
510
|
+
<button type="button" onClick={() => handleSelectRow(contact)} className="flex w-full min-w-0 items-center gap-2 text-left">
|
|
498
511
|
<ContactAvatar displayName={contact.displayName} size={28} />
|
|
499
|
-
<span className="truncate font-medium">
|
|
512
|
+
<span className="min-w-0 truncate font-medium">
|
|
500
513
|
{contact.displayName}
|
|
501
514
|
{contact.favorite && <span aria-label="Favorite"> ★</span>}
|
|
502
515
|
</span>
|
|
503
516
|
</button>
|
|
504
517
|
</td>
|
|
505
|
-
<td className="px-3 py-2 text-text-muted
|
|
518
|
+
<td className="max-w-0 truncate px-3 py-2 text-text-muted">{primaryInfo(contact)}</td>
|
|
506
519
|
</tr>
|
|
507
520
|
))}
|
|
508
521
|
</tbody>
|
|
@@ -513,9 +526,9 @@ function ContactsContent({ userUid }: { userUid?: string }) {
|
|
|
513
526
|
{/* On mobile, "selected"/"edit" are unreachable (row taps navigate to /contacts/:uid instead —
|
|
514
527
|
see handleSelectRow), so this pane only needs to show there for "new", which stays in-place
|
|
515
528
|
on every device (an unsaved contact has no uid for a route). Always visible on desktop. */}
|
|
516
|
-
<div className={["flex-1 min-w-0
|
|
529
|
+
<div className={["flex-1 min-w-0 min-h-0 flex-col md:flex", mode === "new" ? "flex" : "hidden"].join(" ")}>
|
|
517
530
|
{savedElsewhere && mode !== "new" && (
|
|
518
|
-
<p role="status" className="mb-
|
|
531
|
+
<p role="status" className="m-6 mb-0 text-sm py-2 px-3 rounded-sm bg-surface-alt text-text">
|
|
519
532
|
{savedElsewhere.displayName} was added to{" "}
|
|
520
533
|
{mailboxes.find((mb) => mb.uid === savedElsewhere.mailboxUid)?.displayName ?? "another mailbox"}.{" "}
|
|
521
534
|
<a
|
|
@@ -537,17 +550,22 @@ function ContactsContent({ userUid }: { userUid?: string }) {
|
|
|
537
550
|
) : mode === "edit" && selected ? (
|
|
538
551
|
<ContactForm contact={selected} onSaved={handleSaved} onCancel={handleCancel} />
|
|
539
552
|
) : selected ? (
|
|
540
|
-
<
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
553
|
+
<div className="min-h-0 flex-1 overflow-y-auto p-6">
|
|
554
|
+
<ContactDetailPane
|
|
555
|
+
contact={selected}
|
|
556
|
+
onEdit={() => setMode("edit")}
|
|
557
|
+
onDelete={() => handleDelete(selected)}
|
|
558
|
+
onKeysChanged={() => void reload()}
|
|
559
|
+
canResolveKeys={ownsMailbox || delegateCanUpdate}
|
|
560
|
+
/>
|
|
561
|
+
</div>
|
|
547
562
|
) : (
|
|
548
|
-
<
|
|
563
|
+
<div className="flex flex-1 items-center justify-center p-6 text-center">
|
|
564
|
+
<p className="text-sm text-text-muted">Select a contact, or create a new one.</p>
|
|
565
|
+
</div>
|
|
549
566
|
)}
|
|
550
567
|
</div>
|
|
568
|
+
</div>
|
|
551
569
|
<Modal open={confirmingBulkDelete} onClose={() => setConfirmingBulkDelete(false)} title="Delete contacts">
|
|
552
570
|
<p className="text-sm mb-5">
|
|
553
571
|
Delete {checkedContacts.length} selected {checkedContacts.length === 1 ? "contact" : "contacts"}? They
|
|
@@ -565,3 +583,5 @@ function ContactsContent({ userUid }: { userUid?: string }) {
|
|
|
565
583
|
</div>
|
|
566
584
|
);
|
|
567
585
|
}
|
|
586
|
+
|
|
587
|
+
export default routedPage("/contacts", ContactsPage);
|