@rapidmx/web-client 0.15.1 → 0.17.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 +381 -373
- package/apps/admin/branding/index.tsx +39 -39
- package/apps/admin/data-requests/index.tsx +482 -480
- package/apps/admin/distribution-lists/new/index.tsx +3 -1
- package/apps/admin/domains/[uid].tsx +166 -164
- package/apps/admin/domains/new/index.tsx +3 -1
- package/apps/admin/escrow-scopes/[uid].tsx +350 -348
- package/apps/admin/escrow-scopes/new/index.tsx +3 -1
- package/apps/admin/index.tsx +129 -124
- package/apps/admin/mailboxes/[uid].tsx +271 -224
- package/apps/admin/mailboxes/new/index.tsx +30 -28
- package/apps/admin/plugins/index.tsx +15 -15
- package/apps/admin/retention-policy/index.tsx +39 -39
- package/apps/admin/signing-certificates/index.tsx +343 -343
- package/apps/admin/transport-rules/new/index.tsx +3 -1
- package/apps/escrow/audit-log/index.tsx +196 -196
- package/apps/escrow/matters/[uid].tsx +621 -621
- package/apps/escrow/matters/new/index.tsx +3 -1
- package/apps/shared/auth/adminAccess.ts +99 -99
- package/apps/shared/components/admin/layout/AdminShell.tsx +381 -378
- package/apps/shared/components/admin/mailboxes/EraseLeftoverDataDialog.tsx +238 -0
- package/apps/shared/components/admin/mailboxes/EscrowScopeCard.tsx +152 -152
- package/apps/shared/components/admin/mailboxes/LeftoverMailboxesSection.tsx +194 -0
- package/apps/shared/components/admin/settings/BrandingForm.tsx +423 -423
- package/apps/shared/components/admin/settings/EncryptionPolicyForm.tsx +119 -119
- package/apps/shared/components/admin/settings/MailboxCreateForm.tsx +50 -3
- package/apps/shared/components/admin/settings/MailboxPolicyForm.tsx +198 -198
- package/apps/shared/components/admin/settings/PluginsManager.tsx +1545 -1545
- package/apps/shared/components/admin/settings/RetentionPolicyForm.tsx +182 -182
- package/apps/shared/components/admin/setup/EscrowSetupStep.tsx +288 -288
- package/apps/shared/components/admin/setup/SetupWizard.tsx +446 -444
- package/apps/shared/components/admin/usePagedList.tsx +129 -129
- package/apps/shared/components/calendar/EventEditor.tsx +5 -10
- package/apps/shared/components/calendar/EventFormParts.tsx +16 -47
- package/apps/shared/components/calendar/EventModal.tsx +206 -206
- package/apps/shared/components/calendar/GuestInput.tsx +100 -0
- package/apps/shared/components/calendar/MonthView.tsx +185 -185
- package/apps/shared/components/calendar/RecurrenceEditor.tsx +227 -227
- package/apps/shared/components/calendar/RequestChangeForm.tsx +23 -54
- package/apps/shared/components/calendar/SplitDayView.tsx +144 -144
- package/apps/shared/components/calendar/TimeGridView.tsx +246 -246
- package/apps/shared/components/calendar/allDay.ts +124 -124
- package/apps/shared/components/calendar/eventForm.ts +2 -2
- package/apps/shared/components/calendar/eventFormat.ts +49 -22
- package/apps/shared/components/calendar/layout/CalendarShell.tsx +201 -200
- package/apps/shared/components/contacts/ContactForm.tsx +383 -383
- package/apps/shared/components/contacts/ContactsSidebar.tsx +1 -1
- package/apps/shared/components/contacts/ContactsToolbar.tsx +103 -98
- package/apps/shared/components/contacts/layout/ContactsShell.tsx +218 -216
- package/apps/shared/components/escrow/layout/EscrowShell.tsx +155 -155
- package/apps/shared/components/layout/AppShell.tsx +461 -480
- package/apps/shared/components/layout/FloatingActionButton.tsx +31 -0
- package/apps/shared/components/layout/KeyEnrollmentGate.tsx +398 -398
- package/apps/shared/components/layout/MailboxProvisioning.tsx +168 -168
- package/apps/shared/components/layout/ResponsiveToolbar.tsx +315 -315
- package/apps/shared/components/layout/ThemeSwitch.tsx +84 -84
- package/apps/shared/components/layout/UserMenu.tsx +439 -424
- package/apps/shared/components/mail/ConversationList.tsx +323 -323
- package/apps/shared/components/mail/ConversationThreadPane.tsx +613 -491
- package/apps/shared/components/mail/EmptyFolderBar.tsx +41 -0
- package/apps/shared/components/mail/MailSelectionBar.tsx +240 -227
- package/apps/shared/components/mail/MenuButton.tsx +31 -11
- package/apps/shared/components/mail/MessageDetailPane.tsx +1757 -1559
- package/apps/shared/components/mail/PermanentDeleteDialog.tsx +47 -0
- package/apps/shared/components/mail/compose/ComposeContext.tsx +312 -312
- package/apps/shared/components/mail/compose/ComposeToolbar.tsx +422 -422
- package/apps/shared/components/mail/compose/ComposeWindow.tsx +1681 -1677
- package/apps/shared/components/mail/compose/RecipientInput.tsx +54 -11
- package/apps/shared/components/mail/compose/RichTextEditor.tsx +147 -147
- package/apps/shared/components/mail/compose/composeFlushRegistry.ts +60 -60
- package/apps/shared/components/mail/compose/quotedBody.ts +161 -161
- package/apps/shared/components/mail/layout/FolderBadgeChip.tsx +21 -0
- package/apps/shared/components/mail/layout/MailShell.tsx +161 -134
- package/apps/shared/components/mail/layout/SidebarSection.tsx +66 -0
- package/apps/shared/components/mail/reading/MessageMoreMenu.tsx +258 -0
- package/apps/shared/components/mail/reading/MessageSourceDialog.tsx +79 -0
- package/apps/shared/components/mail/reading/PendingMessageCard.tsx +68 -0
- package/apps/shared/components/mail/reading/messageExport.ts +59 -0
- package/apps/shared/components/mail/reading/printMessage.ts +99 -0
- package/apps/shared/components/mail/reading/useMessageActions.ts +443 -0
- package/apps/shared/components/mail/verificationSeals.ts +125 -125
- package/apps/shared/components/rules/RuleBuilder.tsx +311 -311
- package/apps/shared/components/settings/SigningCertificateCard.tsx +344 -344
- package/apps/shared/components/settings/layout/SettingsShell.tsx +257 -254
- package/apps/shared/components/tasks/TasksSidebar.tsx +1 -1
- package/apps/shared/components/tasks/layout/TasksShell.tsx +219 -217
- package/apps/shared/keyboard/GlobalShortcuts.tsx +51 -51
- package/apps/shared/keyboard/ShortcutProvider.tsx +62 -62
- package/apps/shared/keyboard/ShortcutsDialog.tsx +84 -84
- package/apps/shared/keyboard/dispatch.ts +124 -124
- package/apps/shared/keyboard/format.ts +89 -89
- package/apps/shared/keyboard/keymap.ts +114 -114
- package/apps/shared/keyboard/registry.ts +65 -65
- package/apps/shared/keyboard/targets.ts +79 -79
- package/apps/shared/mail/folderCounts.ts +17 -0
- package/apps/shared/mail/folderOfType.ts +49 -0
- package/apps/shared/mail/folderTree.ts +143 -143
- package/apps/shared/mail/listAllPages.ts +39 -39
- package/apps/shared/mail/newMailNotifications.ts +171 -171
- package/apps/shared/mail/outbox/outgoingReplies.ts +192 -0
- package/apps/shared/mail/outbox/sendJob.ts +19 -1
- package/apps/shared/mail/outbox/sendOutcomes.ts +13 -4
- package/apps/shared/mail/permanentDelete.ts +160 -0
- package/apps/shared/mail/primaryMailbox.ts +71 -0
- package/apps/shared/mail/reportNotices.ts +66 -0
- package/apps/shared/mail/senderBlocking.ts +141 -0
- package/apps/shared/mail/useCollapsedSections.ts +146 -0
- package/apps/shared/mail/useMailConnection.ts +205 -203
- package/apps/shared/mail/useMailLiveUpdates.ts +277 -277
- package/apps/shared/mail/useMailboxUpdateAccess.ts +60 -0
- package/apps/shared/mail/useMarkMessageRead.ts +47 -47
- package/apps/shared/mail/useNewMailNotifications.ts +178 -178
- package/apps/shared/mail/usePermanentDelete.tsx +160 -0
- package/apps/shared/navigation/frameContext.tsx +1 -1
- package/apps/shared/navigation/index.ts +43 -0
- package/apps/shared/navigation/pageTitle.ts +19 -0
- package/apps/shared/notifications/store.ts +560 -560
- package/apps/shared/search/LocalIndexLifecycle.tsx +114 -114
- package/apps/shared/search/crossMailboxSearch.ts +169 -0
- package/apps/shared/search/localIndexBuilder.ts +481 -481
- package/apps/shared/signing/enrollmentStorage.ts +33 -33
- package/apps/shared/signing/enrollmentTracker.ts +385 -385
- package/apps/shared/signing/enrollmentView.ts +251 -251
- package/apps/shared/signing/useNow.ts +19 -19
- package/apps/shared/signing/useSigningEnrollmentWatcher.ts +90 -90
- package/apps/shared/styles/app.css +396 -386
- package/apps/www/_shell.tsx +82 -0
- package/apps/www/calendar/index.tsx +581 -571
- package/apps/www/contacts/[uid].tsx +112 -109
- package/apps/www/contacts/index.tsx +14 -3
- package/apps/www/index.tsx +2962 -2479
- package/apps/www/messages/[uid].tsx +139 -135
- package/apps/www/settings/appearance/index.tsx +5 -2
- package/apps/www/settings/auto-reply/index.tsx +136 -133
- package/apps/www/settings/blocked-senders/index.tsx +303 -0
- package/apps/www/settings/encryption/index.tsx +1290 -1287
- package/apps/www/settings/filters/[uid].tsx +179 -176
- package/apps/www/settings/filters/index.tsx +105 -102
- package/apps/www/settings/filters/new/index.tsx +165 -140
- package/apps/www/settings/labels/index.tsx +207 -204
- package/apps/www/settings/privacy/index.tsx +495 -492
- package/apps/www/settings/profile/index.tsx +251 -248
- package/apps/www/settings/read-receipts/index.tsx +150 -147
- package/apps/www/settings/sharing/index.tsx +259 -256
- package/apps/www/settings/signatures/[uid].tsx +175 -172
- package/apps/www/settings/signatures/index.tsx +91 -88
- package/apps/www/settings/signatures/new/index.tsx +138 -135
- package/apps/www/tasks/index.tsx +654 -649
- package/dist/apps/admin/data-requests/index.js +1 -1
- package/dist/apps/admin/distribution-lists/new/index.js +3 -1
- package/dist/apps/admin/domains/[uid].js +3 -1
- package/dist/apps/admin/domains/new/index.js +3 -1
- package/dist/apps/admin/escrow-scopes/[uid].js +3 -1
- package/dist/apps/admin/escrow-scopes/new/index.js +3 -1
- package/dist/apps/admin/index.js +5 -2
- package/dist/apps/admin/mailboxes/[uid].js +15 -3
- package/dist/apps/admin/mailboxes/new/index.js +3 -1
- package/dist/apps/admin/transport-rules/new/index.js +3 -1
- package/dist/apps/escrow/matters/new/index.js +3 -1
- package/dist/apps/shared/components/admin/layout/AdminShell.js +6 -3
- package/dist/apps/shared/components/admin/mailboxes/EraseLeftoverDataDialog.d.ts +35 -0
- package/dist/apps/shared/components/admin/mailboxes/EraseLeftoverDataDialog.js +115 -0
- package/dist/apps/shared/components/admin/mailboxes/LeftoverMailboxesSection.d.ts +16 -0
- package/dist/apps/shared/components/admin/mailboxes/LeftoverMailboxesSection.js +92 -0
- package/dist/apps/shared/components/admin/settings/BrandingForm.js +3 -3
- package/dist/apps/shared/components/admin/settings/MailboxCreateForm.js +25 -3
- package/dist/apps/shared/components/admin/setup/SetupWizard.js +3 -1
- package/dist/apps/shared/components/calendar/EventEditor.js +5 -10
- package/dist/apps/shared/components/calendar/EventFormParts.d.ts +3 -2
- package/dist/apps/shared/components/calendar/EventFormParts.js +5 -16
- package/dist/apps/shared/components/calendar/GuestInput.d.ts +45 -0
- package/dist/apps/shared/components/calendar/GuestInput.js +30 -0
- package/dist/apps/shared/components/calendar/RequestChangeForm.js +11 -22
- package/dist/apps/shared/components/calendar/eventForm.d.ts +2 -2
- package/dist/apps/shared/components/calendar/eventFormat.d.ts +21 -8
- package/dist/apps/shared/components/calendar/eventFormat.js +50 -23
- package/dist/apps/shared/components/calendar/layout/CalendarShell.js +5 -4
- package/dist/apps/shared/components/contacts/ContactsSidebar.js +1 -1
- package/dist/apps/shared/components/contacts/ContactsToolbar.d.ts +3 -1
- package/dist/apps/shared/components/contacts/ContactsToolbar.js +4 -2
- package/dist/apps/shared/components/contacts/layout/ContactsShell.js +7 -5
- package/dist/apps/shared/components/layout/AppShell.d.ts +8 -11
- package/dist/apps/shared/components/layout/AppShell.js +24 -33
- package/dist/apps/shared/components/layout/FloatingActionButton.d.ts +13 -0
- package/dist/apps/shared/components/layout/FloatingActionButton.js +9 -0
- package/dist/apps/shared/components/layout/UserMenu.d.ts +4 -1
- package/dist/apps/shared/components/layout/UserMenu.js +6 -5
- package/dist/apps/shared/components/mail/ConversationThreadPane.js +127 -22
- package/dist/apps/shared/components/mail/EmptyFolderBar.d.ts +18 -0
- package/dist/apps/shared/components/mail/EmptyFolderBar.js +10 -0
- package/dist/apps/shared/components/mail/MailSelectionBar.d.ts +14 -4
- package/dist/apps/shared/components/mail/MailSelectionBar.js +11 -13
- package/dist/apps/shared/components/mail/MenuButton.d.ts +9 -2
- package/dist/apps/shared/components/mail/MenuButton.js +15 -11
- package/dist/apps/shared/components/mail/MessageDetailPane.d.ts +5 -0
- package/dist/apps/shared/components/mail/MessageDetailPane.js +147 -7
- package/dist/apps/shared/components/mail/PermanentDeleteDialog.d.ts +19 -0
- package/dist/apps/shared/components/mail/PermanentDeleteDialog.js +11 -0
- package/dist/apps/shared/components/mail/compose/ComposeWindow.js +8 -4
- package/dist/apps/shared/components/mail/compose/RecipientInput.d.ts +21 -1
- package/dist/apps/shared/components/mail/compose/RecipientInput.js +18 -10
- package/dist/apps/shared/components/mail/layout/FolderBadgeChip.d.ts +6 -0
- package/dist/apps/shared/components/mail/layout/FolderBadgeChip.js +9 -0
- package/dist/apps/shared/components/mail/layout/MailShell.d.ts +16 -7
- package/dist/apps/shared/components/mail/layout/MailShell.js +78 -65
- package/dist/apps/shared/components/mail/layout/SidebarSection.d.ts +23 -0
- package/dist/apps/shared/components/mail/layout/SidebarSection.js +16 -0
- package/dist/apps/shared/components/mail/reading/MessageMoreMenu.d.ts +56 -0
- package/dist/apps/shared/components/mail/reading/MessageMoreMenu.js +153 -0
- package/dist/apps/shared/components/mail/reading/MessageSourceDialog.d.ts +27 -0
- package/dist/apps/shared/components/mail/reading/MessageSourceDialog.js +27 -0
- package/dist/apps/shared/components/mail/reading/PendingMessageCard.d.ts +14 -0
- package/dist/apps/shared/components/mail/reading/PendingMessageCard.js +16 -0
- package/dist/apps/shared/components/mail/reading/messageExport.d.ts +19 -0
- package/dist/apps/shared/components/mail/reading/messageExport.js +51 -0
- package/dist/apps/shared/components/mail/reading/printMessage.d.ts +30 -0
- package/dist/apps/shared/components/mail/reading/printMessage.js +70 -0
- package/dist/apps/shared/components/mail/reading/useMessageActions.d.ts +57 -0
- package/dist/apps/shared/components/mail/reading/useMessageActions.js +366 -0
- package/dist/apps/shared/components/settings/layout/SettingsShell.js +10 -7
- package/dist/apps/shared/components/tasks/TasksSidebar.js +1 -1
- package/dist/apps/shared/components/tasks/layout/TasksShell.js +7 -5
- package/dist/apps/shared/keyboard/GlobalShortcuts.js +1 -1
- package/dist/apps/shared/mail/folderCounts.d.ts +10 -0
- package/dist/apps/shared/mail/folderCounts.js +12 -0
- package/dist/apps/shared/mail/folderOfType.d.ts +13 -0
- package/dist/apps/shared/mail/folderOfType.js +40 -0
- package/dist/apps/shared/mail/outbox/outgoingReplies.d.ts +80 -0
- package/dist/apps/shared/mail/outbox/outgoingReplies.js +131 -0
- package/dist/apps/shared/mail/outbox/sendJob.d.ts +5 -1
- package/dist/apps/shared/mail/outbox/sendJob.js +14 -1
- package/dist/apps/shared/mail/outbox/sendOutcomes.js +13 -4
- package/dist/apps/shared/mail/permanentDelete.d.ts +62 -0
- package/dist/apps/shared/mail/permanentDelete.js +127 -0
- package/dist/apps/shared/mail/primaryMailbox.d.ts +29 -0
- package/dist/apps/shared/mail/primaryMailbox.js +61 -0
- package/dist/apps/shared/mail/reportNotices.d.ts +21 -0
- package/dist/apps/shared/mail/reportNotices.js +47 -0
- package/dist/apps/shared/mail/senderBlocking.d.ts +26 -0
- package/dist/apps/shared/mail/senderBlocking.js +92 -0
- package/dist/apps/shared/mail/useCollapsedSections.d.ts +32 -0
- package/dist/apps/shared/mail/useCollapsedSections.js +110 -0
- package/dist/apps/shared/mail/useMailConnection.js +3 -1
- package/dist/apps/shared/mail/useMailboxUpdateAccess.d.ts +11 -0
- package/dist/apps/shared/mail/useMailboxUpdateAccess.js +52 -0
- package/dist/apps/shared/mail/usePermanentDelete.d.ts +35 -0
- package/dist/apps/shared/mail/usePermanentDelete.js +96 -0
- package/dist/apps/shared/navigation/frameContext.d.ts +1 -1
- package/dist/apps/shared/navigation/index.d.ts +16 -0
- package/dist/apps/shared/navigation/index.js +34 -0
- package/dist/apps/shared/navigation/pageTitle.d.ts +11 -0
- package/dist/apps/shared/navigation/pageTitle.js +12 -0
- package/dist/apps/shared/search/crossMailboxSearch.d.ts +72 -0
- package/dist/apps/shared/search/crossMailboxSearch.js +136 -0
- package/dist/apps/shared/styles/app.css +396 -386
- package/dist/apps/www/_shell.d.ts +26 -0
- package/dist/apps/www/_shell.js +31 -0
- package/dist/apps/www/calendar/index.d.ts +7 -2
- package/dist/apps/www/calendar/index.js +7 -4
- package/dist/apps/www/contacts/[uid].d.ts +14 -3
- package/dist/apps/www/contacts/[uid].js +5 -3
- package/dist/apps/www/contacts/index.d.ts +7 -2
- package/dist/apps/www/contacts/index.js +8 -4
- package/dist/apps/www/index.d.ts +7 -2
- package/dist/apps/www/index.js +542 -207
- package/dist/apps/www/messages/[uid].d.ts +14 -3
- package/dist/apps/www/messages/[uid].js +7 -5
- package/dist/apps/www/settings/appearance/index.d.ts +8 -2
- package/dist/apps/www/settings/appearance/index.js +4 -2
- package/dist/apps/www/settings/auto-reply/index.d.ts +7 -2
- package/dist/apps/www/settings/auto-reply/index.js +4 -2
- package/dist/apps/www/settings/blocked-senders/index.d.ts +9 -0
- package/dist/apps/www/settings/blocked-senders/index.js +134 -0
- package/dist/apps/www/settings/encryption/index.d.ts +7 -2
- package/dist/apps/www/settings/encryption/index.js +4 -2
- package/dist/apps/www/settings/filters/[uid].d.ts +7 -2
- package/dist/apps/www/settings/filters/[uid].js +4 -2
- package/dist/apps/www/settings/filters/index.d.ts +7 -2
- package/dist/apps/www/settings/filters/index.js +4 -2
- package/dist/apps/www/settings/filters/new/index.d.ts +7 -2
- package/dist/apps/www/settings/filters/new/index.js +28 -5
- package/dist/apps/www/settings/labels/index.d.ts +7 -2
- package/dist/apps/www/settings/labels/index.js +4 -2
- package/dist/apps/www/settings/privacy/index.d.ts +7 -2
- package/dist/apps/www/settings/privacy/index.js +4 -2
- package/dist/apps/www/settings/profile/index.d.ts +7 -2
- package/dist/apps/www/settings/profile/index.js +4 -2
- package/dist/apps/www/settings/read-receipts/index.d.ts +7 -2
- package/dist/apps/www/settings/read-receipts/index.js +4 -2
- package/dist/apps/www/settings/sharing/index.d.ts +7 -2
- package/dist/apps/www/settings/sharing/index.js +4 -2
- package/dist/apps/www/settings/signatures/[uid].d.ts +7 -2
- package/dist/apps/www/settings/signatures/[uid].js +4 -2
- package/dist/apps/www/settings/signatures/index.d.ts +7 -2
- package/dist/apps/www/settings/signatures/index.js +4 -2
- package/dist/apps/www/settings/signatures/new/index.d.ts +7 -2
- package/dist/apps/www/settings/signatures/new/index.js +5 -3
- package/dist/apps/www/tasks/index.d.ts +7 -2
- package/dist/apps/www/tasks/index.js +5 -3
- package/package.json +4 -2
- package/apps/shared/navigation/AppRouter.tsx +0 -300
- package/apps/shared/navigation/idle.ts +0 -45
- package/apps/shared/navigation/routerContext.tsx +0 -83
- package/apps/shared/navigation/routes.ts +0 -72
- package/apps/www/_routedPage.tsx +0 -24
- package/apps/www/_routes.ts +0 -37
- package/dist/apps/shared/navigation/AppRouter.d.ts +0 -52
- package/dist/apps/shared/navigation/AppRouter.js +0 -242
- package/dist/apps/shared/navigation/idle.d.ts +0 -14
- package/dist/apps/shared/navigation/idle.js +0 -43
- package/dist/apps/shared/navigation/routerContext.d.ts +0 -37
- package/dist/apps/shared/navigation/routerContext.js +0 -56
- package/dist/apps/shared/navigation/routes.d.ts +0 -32
- package/dist/apps/shared/navigation/routes.js +0 -37
- package/dist/apps/www/_routedPage.d.ts +0 -12
- package/dist/apps/www/_routedPage.js +0 -19
- package/dist/apps/www/_routes.d.ts +0 -11
- package/dist/apps/www/_routes.js +0 -31
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { MailShellProps } from "../../shared/components/mail/layout/MailShell.js";
|
|
2
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Only reached on mobile (below the `md` breakpoint) — desktop's `apps/www/index.tsx` keeps its existing
|
|
5
|
+
* inline reading pane and never navigates here; see that file's `handleSelect`. A row of the conversation list
|
|
6
|
+
* comes with `?conversation=<id>` (`handleOpenConversation`), and then this page is the whole thread, opened at this
|
|
7
|
+
* message, as the desktop's reading pane is; without it (a flat list, a link to a message) it is that one message.
|
|
8
|
+
*/
|
|
9
|
+
declare function MessageDetailPage(props: MailShellProps & {
|
|
3
10
|
params: {
|
|
4
11
|
uid: string;
|
|
5
12
|
};
|
|
6
|
-
}
|
|
7
|
-
export default
|
|
13
|
+
}): React.JSX.Element;
|
|
14
|
+
export default MessageDetailPage;
|
|
15
|
+
/** The tab's title: `Brand: Mail` (see `pageTitle()`). */
|
|
16
|
+
export declare const title: (props: {
|
|
17
|
+
branding?: Pick<import("@rapidmx/react-shared/branding/brandingApi.js").Branding, "title" | "companyName"> | null;
|
|
18
|
+
}) => string;
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
4
4
|
// SPDX-License-Identifier: MPL-2.0
|
|
5
5
|
///////////////////////////////////////////////////////////////////////////////
|
|
6
|
-
import {
|
|
6
|
+
import { pageTitle } from "../../shared/navigation/pageTitle.js";
|
|
7
7
|
import { useEffect, useState } from "react";
|
|
8
8
|
import { ApiRequestError } from "@rapidmx/react-shared/util/api.js";
|
|
9
9
|
import { getMessage } from "@rapidmx/react-shared/mail/mailApi.js";
|
|
@@ -12,7 +12,7 @@ import { useMessageAttachments } from "@rapidmx/react-shared/mail/mailDetailHook
|
|
|
12
12
|
import { useMarkMessageRead } from "../../shared/mail/useMarkMessageRead.js";
|
|
13
13
|
import MailShell, { useMailShell } from "../../shared/components/mail/layout/MailShell.js";
|
|
14
14
|
import { LazyConversationThreadPane, LazyMessageDetailPane } from "../../shared/components/mail/LazyReadingPane.js";
|
|
15
|
-
import {
|
|
15
|
+
import { useSearchParams } from "@rapidrest/react/client";
|
|
16
16
|
import { ReadingPaneSkeleton } from "../../shared/components/mail/reading/MessageCard.js";
|
|
17
17
|
import Alert from "@rapidmx/react-shared/components/feedback/Alert.js";
|
|
18
18
|
/**
|
|
@@ -30,7 +30,7 @@ function MessageDetailContent({ uid }) {
|
|
|
30
30
|
const [loading, setLoading] = useState(true);
|
|
31
31
|
const [error, setError] = useState(null);
|
|
32
32
|
const [labels, setLabels] = useState([]);
|
|
33
|
-
const conversationId =
|
|
33
|
+
const conversationId = useSearchParams()[0].get("conversation");
|
|
34
34
|
useEffect(() => {
|
|
35
35
|
setLoading(true);
|
|
36
36
|
setError(null);
|
|
@@ -80,6 +80,8 @@ function MessageDetailContent({ uid }) {
|
|
|
80
80
|
if (conversationId) {
|
|
81
81
|
return (_jsxs("div", { className: "flex flex-col h-full min-h-0", children: [_jsx("a", { href: backHref, className: "text-sm text-primary-dark hover:underline block px-4 pt-3", children: "\u2190 Back to messages" }), _jsx(LazyConversationThreadPane, { conversation: { conversationId, subject: message.subject, messageCount: 1 }, selectedUid: message.uid, mailboxUid: message.mailboxUid, folders: folders, labels: labels, shortcuts: true, onMessagePatched: () => undefined, onMessageRemoved: () => undefined, onLabelCreated: (label) => setLabels((prev) => [...prev, label]), onFolderCreated: onFolderCreated })] }));
|
|
82
82
|
}
|
|
83
|
-
return (_jsx(LazyMessageDetailPane, { shortcuts: true, message: message, attachments: attachments, backHref: backHref, isSentItems: isSentItems, onRecalled: setMessage, isOutbox: isOutbox, onReceiptHandled: setMessage, draftsFolderUid: draftsFolderUid, folders: folders, onMoved: setMessage, onFolderCreated: onFolderCreated, onScheduledSendCanceled: setMessage, onArchived: setMessage, labels: labels, onLabelsChanged: setMessage, onLabelCreated: (label) => setLabels((prev) => [...prev, label]) }));
|
|
83
|
+
return (_jsx(LazyMessageDetailPane, { shortcuts: true, message: message, attachments: attachments, backHref: backHref, isSentItems: isSentItems, onRecalled: setMessage, isOutbox: isOutbox, onReceiptHandled: setMessage, draftsFolderUid: draftsFolderUid, folders: folders, onMoved: setMessage, onFolderCreated: onFolderCreated, onScheduledSendCanceled: setMessage, onArchived: setMessage, onChanged: setMessage, labels: labels, onLabelsChanged: setMessage, onLabelCreated: (label) => setLabels((prev) => [...prev, label]) }));
|
|
84
84
|
}
|
|
85
|
-
export default
|
|
85
|
+
export default MessageDetailPage;
|
|
86
|
+
/** The tab's title: `Brand: Mail` (see `pageTitle()`). */
|
|
87
|
+
export const title = pageTitle("Mail");
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { SettingsShellProps } from "../../../shared/components/settings/layout/SettingsShell.js";
|
|
2
3
|
export type SettingsAppearancePageProps = Omit<SettingsShellProps, "active">;
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
/** Settings > Appearance: the colour scheme, theme colours and background. Not mailbox-scoped - it is the signed-in user's own. */
|
|
5
|
+
declare function SettingsAppearancePage(props: SettingsAppearancePageProps): React.JSX.Element;
|
|
6
|
+
export default SettingsAppearancePage;
|
|
7
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
8
|
+
export declare const title: (props: {
|
|
9
|
+
branding?: Pick<import("@rapidmx/react-shared/branding/brandingApi.js").Branding, "title" | "companyName"> | null;
|
|
10
|
+
}) => string;
|
|
@@ -3,11 +3,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
4
4
|
// SPDX-License-Identifier: MPL-2.0
|
|
5
5
|
///////////////////////////////////////////////////////////////////////////////
|
|
6
|
-
import {
|
|
6
|
+
import { pageTitle } from "../../../shared/navigation/pageTitle.js";
|
|
7
7
|
import SettingsShell from "../../../shared/components/settings/layout/SettingsShell.js";
|
|
8
8
|
import AppearanceForm from "../../../shared/appearance/AppearanceForm.js";
|
|
9
9
|
/** Settings > Appearance: the colour scheme, theme colours and background. Not mailbox-scoped - it is the signed-in user's own. */
|
|
10
10
|
function SettingsAppearancePage(props) {
|
|
11
11
|
return (_jsx(SettingsShell, { ...props, active: "appearance", children: _jsx(AppearanceForm, {}) }));
|
|
12
12
|
}
|
|
13
|
-
export default
|
|
13
|
+
export default SettingsAppearancePage;
|
|
14
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
15
|
+
export const title = pageTitle("Settings");
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { SettingsShellProps } from "../../../shared/components/settings/layout/SettingsShell.js";
|
|
2
3
|
export type SettingsAutoReplyPageProps = Omit<SettingsShellProps, "active">;
|
|
3
|
-
declare
|
|
4
|
-
export default
|
|
4
|
+
declare function SettingsAutoReplyPage(props: SettingsAutoReplyPageProps): React.JSX.Element;
|
|
5
|
+
export default SettingsAutoReplyPage;
|
|
6
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
7
|
+
export declare const title: (props: {
|
|
8
|
+
branding?: Pick<import("@rapidmx/react-shared/branding/brandingApi.js").Branding, "title" | "companyName"> | null;
|
|
9
|
+
}) => string;
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
4
4
|
// SPDX-License-Identifier: MPL-2.0
|
|
5
5
|
///////////////////////////////////////////////////////////////////////////////
|
|
6
|
-
import {
|
|
6
|
+
import { pageTitle } from "../../../shared/navigation/pageTitle.js";
|
|
7
7
|
import { useState } from "react";
|
|
8
8
|
import { toDatetimeLocal } from "@rapidmx/react-shared/util/dateInput.js";
|
|
9
9
|
import { updateMailbox } from "@rapidmx/react-shared/mail/mailApi.js";
|
|
@@ -55,4 +55,6 @@ function AutoReplyContent() {
|
|
|
55
55
|
}
|
|
56
56
|
return (_jsx("div", { className: "flex-1 min-w-0 overflow-y-auto p-6", children: _jsxs("div", { className: "max-w-xl", children: [_jsx("h1", { className: "text-lg font-bold tracking-tight mb-1", children: "Automatic Replies" }), _jsxs("p", { className: "text-sm text-text-muted mb-4", children: ["Send an automatic reply to anyone who emails ", mailbox.displayName, " while you\u2019re away. A calendar event with its own automatic reply enabled takes over for its own start/end window."] }), saved && _jsx("div", { className: "mb-4 text-sm text-success font-medium", children: "Saved." }), _jsxs("form", { onSubmit: handleSubmit, className: "flex flex-col gap-4", children: [_jsxs("label", { className: "flex items-center gap-2 text-sm font-medium", children: [_jsx("input", { type: "checkbox", checked: oofEnabled, onChange: (e) => setOofEnabled(e.target.checked) }), "Automatic replies are on"] }), oofEnabled && (_jsxs(_Fragment, { children: [_jsxs("label", { className: "flex flex-col gap-1.5 text-sm", children: [_jsx("span", { className: "font-semibold", children: "Message" }), _jsx("textarea", { "aria-label": "Automatic reply message", className: INPUT_CLASS, rows: 5, value: oofMessage, onChange: (e) => setOofMessage(e.target.value) })] }), _jsxs("div", { className: "grid grid-cols-2 gap-3", children: [_jsxs("label", { className: "flex flex-col gap-1.5 text-sm", children: [_jsx("span", { className: "font-semibold", children: "Start (optional)" }), _jsx("input", { type: "datetime-local", "aria-label": "Automatic reply start", className: INPUT_CLASS, value: oofStartTime, onChange: (e) => setOofStartTime(e.target.value) })] }), _jsxs("label", { className: "flex flex-col gap-1.5 text-sm", children: [_jsx("span", { className: "font-semibold", children: "End (optional)" }), _jsx("input", { type: "datetime-local", "aria-label": "Automatic reply end", className: INPUT_CLASS, value: oofEndTime, onChange: (e) => setOofEndTime(e.target.value) })] })] }), _jsx("p", { className: "text-xs text-text-muted -mt-2", children: "Leave both blank to stay on indefinitely until turned off." })] })), _jsx("div", { children: _jsx(Button, { type: "submit", loading: saving, disabled: saving, className: "!w-auto", children: "Save" }) })] })] }) }));
|
|
57
57
|
}
|
|
58
|
-
export default
|
|
58
|
+
export default SettingsAutoReplyPage;
|
|
59
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
60
|
+
export const title = pageTitle("Settings");
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SettingsShellProps } from "../../../shared/components/settings/layout/SettingsShell.js";
|
|
3
|
+
export type SettingsBlockedSendersPageProps = Omit<SettingsShellProps, "active">;
|
|
4
|
+
declare function SettingsBlockedSendersPage(props: SettingsBlockedSendersPageProps): React.JSX.Element;
|
|
5
|
+
export default SettingsBlockedSendersPage;
|
|
6
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
7
|
+
export declare const title: (props: {
|
|
8
|
+
branding?: Pick<import("@rapidmx/react-shared/branding/brandingApi.js").Branding, "title" | "companyName"> | null;
|
|
9
|
+
}) => string;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
3
|
+
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
4
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
5
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
6
|
+
import { pageTitle } from "../../../shared/navigation/pageTitle.js";
|
|
7
|
+
import { useId, useRef, useState } from "react";
|
|
8
|
+
import { blockedSendersOf, isSharedWithMe, safeSendersOf } from "@rapidmx/react-shared/mail/mailApi.js";
|
|
9
|
+
import { MAX_SENDER_LIST_ENTRIES, addBlockedSender, addSafeSender, checkSenderEntry, removeBlockedSender, removeSafeSender, } from "@rapidmx/react-shared/mail/senderListsApi.js";
|
|
10
|
+
import SettingsShell, { useSettingsShell } from "../../../shared/components/settings/layout/SettingsShell.js";
|
|
11
|
+
import Button from "@rapidmx/react-shared/components/buttons/Button.js";
|
|
12
|
+
import { useMailboxUpdateAccess } from "../../../shared/mail/useMailboxUpdateAccess.js";
|
|
13
|
+
import { notifyApiError } from "../../../shared/notifications/apiErrors.js";
|
|
14
|
+
function SettingsBlockedSendersPage(props) {
|
|
15
|
+
return (_jsx(SettingsShell, { ...props, active: "blocked-senders", children: _jsx(BlockedSendersContent, {}) }));
|
|
16
|
+
}
|
|
17
|
+
/** What each list is called and does, in the words the page uses for it. */
|
|
18
|
+
const COPY = {
|
|
19
|
+
blocked: {
|
|
20
|
+
title: "Blocked senders",
|
|
21
|
+
add: "Block",
|
|
22
|
+
addLabel: "Add a blocked sender",
|
|
23
|
+
verb: "Blocked",
|
|
24
|
+
other: "safe senders",
|
|
25
|
+
explain: "Mail from these addresses and domains goes to Junk Email, without the spam filter or your filters looking at it.",
|
|
26
|
+
empty: "No blocked senders.",
|
|
27
|
+
},
|
|
28
|
+
safe: {
|
|
29
|
+
title: "Safe senders",
|
|
30
|
+
add: "Trust",
|
|
31
|
+
addLabel: "Add a safe sender",
|
|
32
|
+
verb: "Trusted",
|
|
33
|
+
other: "blocked senders",
|
|
34
|
+
explain: "Mail from these addresses and domains is not sent to Junk Email because of the spam filter's verdict, as long as it passes authentication: " +
|
|
35
|
+
"a valid signature from the sender's own domain. Mail that fails it, carries a virus or is quarantined by policy is still kept out.",
|
|
36
|
+
empty: "No safe senders.",
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
const CAP = MAX_SENDER_LIST_ENTRIES.toLocaleString("en-US");
|
|
40
|
+
/** One list: its count, the form that adds an address or domain to it, and its entries with a Remove button each. */
|
|
41
|
+
function ListSection({ kind, entries, otherEntries, ownAddresses, editable, onAdd, onRemove }) {
|
|
42
|
+
const copy = COPY[kind];
|
|
43
|
+
const id = useId();
|
|
44
|
+
const headingRef = useRef(null);
|
|
45
|
+
const [value, setValue] = useState("");
|
|
46
|
+
const [error, setError] = useState(null);
|
|
47
|
+
const [status, setStatus] = useState(null);
|
|
48
|
+
const [busy, setBusy] = useState(false);
|
|
49
|
+
const full = entries.length >= MAX_SENDER_LIST_ENTRIES;
|
|
50
|
+
const sorted = [...entries].sort();
|
|
51
|
+
async function handleAdd(e) {
|
|
52
|
+
e.preventDefault();
|
|
53
|
+
setStatus(null);
|
|
54
|
+
const checked = checkSenderEntry(value);
|
|
55
|
+
if (!checked.ok) {
|
|
56
|
+
setError(checked.message);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (kind === "blocked" && ownAddresses.includes(checked.entry)) {
|
|
60
|
+
setError("That is one of your own addresses, so it cannot be blocked.");
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
setError(null);
|
|
64
|
+
setBusy(true);
|
|
65
|
+
try {
|
|
66
|
+
const moved = otherEntries.includes(checked.entry);
|
|
67
|
+
const result = await onAdd(checked.entry);
|
|
68
|
+
if (result) {
|
|
69
|
+
setValue("");
|
|
70
|
+
setStatus(!result.changed
|
|
71
|
+
? `${checked.entry} is already on this list.`
|
|
72
|
+
: `${copy.verb} ${checked.entry}.${moved ? ` It was on your ${copy.other} and was moved here.` : ""}`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
finally {
|
|
76
|
+
setBusy(false);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
async function handleRemove(entry) {
|
|
80
|
+
setStatus(null);
|
|
81
|
+
setBusy(true);
|
|
82
|
+
try {
|
|
83
|
+
if (await onRemove(entry)) {
|
|
84
|
+
setStatus(`Removed ${entry}.`);
|
|
85
|
+
// The button that was pressed is gone with its entry: focus goes to the list's heading rather than back to the page's start.
|
|
86
|
+
headingRef.current?.focus();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
finally {
|
|
90
|
+
setBusy(false);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return (_jsxs("section", { "aria-labelledby": `${id}-title`, className: "min-w-0 rounded-md border border-border bg-surface p-4", children: [_jsx("h2", { id: `${id}-title`, ref: headingRef, tabIndex: -1, className: "text-base font-bold tracking-tight outline-none", children: copy.title }), _jsxs("p", { className: "text-xs text-text-muted mt-0.5 mb-2", children: [entries.length.toLocaleString("en-US"), " of ", CAP] }), _jsx("p", { className: "text-sm text-text-muted mb-3", children: copy.explain }), editable && (_jsxs("form", { onSubmit: handleAdd, noValidate: true, className: "mb-3", children: [_jsx("label", { htmlFor: `${id}-entry`, className: "block text-sm font-semibold mb-1.5 text-text", children: copy.addLabel }), _jsxs("div", { className: "flex flex-col sm:flex-row gap-2", children: [_jsx("input", { id: `${id}-entry`, type: "text", inputMode: "email", autoComplete: "off", autoCapitalize: "none", spellCheck: false, value: value, disabled: full || busy, placeholder: "name@example.com or example.com", "aria-invalid": error ? true : undefined, "aria-describedby": `${id}-hint${error ? ` ${id}-error` : ""}`, onChange: (e) => {
|
|
94
|
+
setValue(e.target.value);
|
|
95
|
+
setError(null);
|
|
96
|
+
}, className: "flex-1 min-w-0 text-sm px-3 py-1.5 rounded-md border border-border bg-surface disabled:opacity-55" }), _jsx(Button, { type: "submit", className: "!w-auto shrink-0", disabled: full || busy, loading: busy, children: copy.add })] }), _jsxs("p", { id: `${id}-hint`, className: "text-xs text-text-muted mt-1", children: ["A domain such as example.com covers every address at it, but not its subdomains. An address already on your ", copy.other, " moves here."] }), error && (_jsx("p", { id: `${id}-error`, role: "alert", className: "text-sm text-danger mt-1", children: error })), full && (_jsxs("p", { className: "text-sm text-danger mt-1", children: ["This list is full: it holds ", CAP, " senders. Remove one to add another."] }))] })), _jsx("p", { role: "status", className: "text-sm text-success font-medium mb-2 empty:hidden", children: status }), sorted.length === 0 ? (_jsx("p", { className: "text-sm text-text-muted", children: copy.empty })) : (_jsx("ul", { "aria-label": copy.title, className: "divide-y divide-border border-y border-border", children: sorted.map((entry) => (_jsxs("li", { className: "flex items-center justify-between gap-3 py-2", children: [_jsxs("span", { className: "min-w-0 break-all text-sm", children: [entry, entry.startsWith("@") && _jsxs("span", { className: "block text-xs text-text-muted", children: ["Everyone at ", entry.slice(1)] })] }), editable && (_jsx("button", { type: "button", disabled: busy, "aria-label": `Remove ${entry} from ${copy.title.toLowerCase()}`, onClick: () => void handleRemove(entry), className: "shrink-0 text-sm font-medium text-primary-dark hover:underline disabled:opacity-55", children: "Remove" }))] }, entry))) }))] }));
|
|
97
|
+
}
|
|
98
|
+
function BlockedSendersContent() {
|
|
99
|
+
const { mailboxUid } = useSettingsShell();
|
|
100
|
+
// A mailbox chosen in the shell's switcher is a different set of lists: the content starts over for it.
|
|
101
|
+
return _jsx(ListsContent, {}, mailboxUid);
|
|
102
|
+
}
|
|
103
|
+
function ListsContent() {
|
|
104
|
+
const { mailboxUid, mailboxes } = useSettingsShell();
|
|
105
|
+
// `SettingsShell` only ever renders its children once `mailboxes` has loaded and `mailboxUid` has resolved to one of them - same established
|
|
106
|
+
// non-null pattern as `apps/www/settings/read-receipts/index.tsx`.
|
|
107
|
+
const mailbox = mailboxes.find((mb) => mb.uid === mailboxUid);
|
|
108
|
+
const writable = useMailboxUpdateAccess(mailbox);
|
|
109
|
+
// The lists are the owner's (and a manager's) to change; the server does not say which of the two a delegate is, so one who may update is offered the
|
|
110
|
+
// forms and told what a refusal means.
|
|
111
|
+
const delegated = isSharedWithMe(mailbox);
|
|
112
|
+
// A server before the lists sends neither.
|
|
113
|
+
const supported = mailbox.blockedSenders !== undefined || mailbox.safeSenders !== undefined;
|
|
114
|
+
const [blocked, setBlocked] = useState(blockedSendersOf(mailbox));
|
|
115
|
+
const [safe, setSafe] = useState(safeSendersOf(mailbox));
|
|
116
|
+
const ownAddresses = mailboxes.flatMap((mb) => [mb.primarySmtpAddress, ...(mb.aliasAddresses ?? [])]).filter((a) => !!a).map((a) => a.toLowerCase());
|
|
117
|
+
async function change(action, context) {
|
|
118
|
+
try {
|
|
119
|
+
const result = await action();
|
|
120
|
+
// The answer carries both lists as they now are: adding to one takes the entry off the other.
|
|
121
|
+
setBlocked(result.blockedSenders);
|
|
122
|
+
setSafe(result.safeSenders);
|
|
123
|
+
return result;
|
|
124
|
+
}
|
|
125
|
+
catch (err) {
|
|
126
|
+
notifyApiError(err, context);
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return (_jsx("div", { className: "flex-1 min-w-0 overflow-y-auto p-4 sm:p-6", children: _jsxs("div", { className: "max-w-4xl", children: [_jsx("h1", { className: "text-lg font-bold tracking-tight mb-1", children: "Blocked and safe senders" }), _jsxs("p", { className: "text-sm text-text-muted mb-4", children: ["These lists belong to ", _jsx("span", { className: "font-medium text-text", children: mailbox.displayName }), " (", mailbox.primarySmtpAddress, "). Each entry is an email address or a domain. An entry is on one list at a time: adding it to one takes it off the other."] }), !supported ? (_jsx("p", { role: "status", className: "text-sm text-text-muted", children: "This server does not support blocked and safe senders yet." })) : (_jsxs(_Fragment, { children: [!writable && (_jsx("p", { role: "status", className: "text-sm rounded-md border border-border bg-surface-alt px-3 py-2 mb-4", children: "You have view-only access to this mailbox, so you can see these lists but not change them." })), writable && delegated && (_jsx("p", { className: "text-sm text-text-muted mb-4", children: "Only this mailbox\u2019s owner, or someone with full access to it, can change these lists. If you cannot, the server says so when you try." })), _jsxs("div", { className: "grid gap-4 md:grid-cols-2", children: [_jsx(ListSection, { kind: "blocked", entries: blocked, otherEntries: safe, ownAddresses: ownAddresses, editable: writable, onAdd: (entry) => change(() => addBlockedSender(mailbox.uid, entry), "Couldn't block this sender"), onRemove: (entry) => change(() => removeBlockedSender(mailbox.uid, entry), "Couldn't unblock this sender") }), _jsx(ListSection, { kind: "safe", entries: safe, otherEntries: blocked, ownAddresses: ownAddresses, editable: writable, onAdd: (entry) => change(() => addSafeSender(mailbox.uid, entry), "Couldn't add this safe sender"), onRemove: (entry) => change(() => removeSafeSender(mailbox.uid, entry), "Couldn't remove this safe sender") })] })] }))] }) }));
|
|
131
|
+
}
|
|
132
|
+
export default SettingsBlockedSendersPage;
|
|
133
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
134
|
+
export const title = pageTitle("Settings");
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { SettingsShellProps } from "../../../shared/components/settings/layout/SettingsShell.js";
|
|
2
3
|
/** Mirrors restapi's `BaseKeyVaultRoute` `MAX_MASTER_KEY_WRAPS` - `addMasterKeyWrap()` refuses a vault
|
|
3
4
|
* already holding this many wraps (escrow included). */
|
|
4
5
|
export declare const MAX_MASTER_KEY_WRAPS = 20;
|
|
5
6
|
export type SettingsEncryptionPageProps = Omit<SettingsShellProps, "active">;
|
|
6
|
-
declare
|
|
7
|
-
export default
|
|
7
|
+
declare function SettingsEncryptionPage(props: SettingsEncryptionPageProps): React.JSX.Element;
|
|
8
|
+
export default SettingsEncryptionPage;
|
|
9
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
10
|
+
export declare const title: (props: {
|
|
11
|
+
branding?: Pick<import("@rapidmx/react-shared/branding/brandingApi.js").Branding, "title" | "companyName"> | null;
|
|
12
|
+
}) => string;
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
4
4
|
// SPDX-License-Identifier: MPL-2.0
|
|
5
5
|
///////////////////////////////////////////////////////////////////////////////
|
|
6
|
-
import {
|
|
6
|
+
import { pageTitle } from "../../../shared/navigation/pageTitle.js";
|
|
7
7
|
import { useEffect, useState } from "react";
|
|
8
8
|
import { ApiRequestError } from "@rapidmx/react-shared/util/api.js";
|
|
9
9
|
import { addMasterKeyWrap, cancelSignEnrollment, findActivePublicKey, getCurrentSignEnrollment, getEscrowInfo, getKeyVault, rekey, removeMasterKeyWrap, startSignEnrollment, } from "@rapidmx/react-shared/crypto/keyvaultApi.js";
|
|
@@ -782,4 +782,6 @@ function EncryptionContent({ canManageKeys }) {
|
|
|
782
782
|
? "Checking whether a signing certificate enrollment is still in progress..."
|
|
783
783
|
: "Rotation is unavailable while a signing certificate enrollment is in progress - rotating now would lose the key being enrolled. Try again once it finishes, or cancel the enrollment." })), signingStatus === "pending" && signingEnrollmentId && (_jsxs("div", { className: "flex flex-col gap-2", children: [cancelEnrollmentError && _jsx(Alert, { children: cancelEnrollmentError }), _jsx("div", { children: _jsx(Button, { type: "button", variant: "secondary", className: "!w-auto", loading: cancelingEnrollment, disabled: cancelingEnrollment, onClick: () => handleCancelEnrollment(signingEnrollmentId), children: "Cancel enrollment" }) })] })), _jsx("input", { type: "password", "aria-label": "New password for rotated keys", placeholder: "New password", className: "w-full text-sm border border-border rounded-sm py-1.5 px-2 bg-surface", value: rotationPassword, onChange: (e) => setRotationPassword(e.target.value), disabled: rotating || rotationBlockedBySigning, autoComplete: "new-password" }), _jsx("input", { type: "password", "aria-label": "Confirm new password for rotated keys", placeholder: "Confirm new password", className: "w-full text-sm border border-border rounded-sm py-1.5 px-2 bg-surface", value: rotationConfirmPassword, onChange: (e) => setRotationConfirmPassword(e.target.value), disabled: rotating || rotationBlockedBySigning, autoComplete: "new-password" }), _jsx("div", { children: _jsx(Button, { type: "submit", variant: "secondary", className: "!w-auto text-danger", loading: rotating, disabled: rotating || rotationBlockedBySigning, children: "Rotate keys now" }) })] })] })), _jsxs("div", { children: [_jsx("h2", { className: "text-sm font-semibold mb-2", children: "Session timeout" }), _jsx("p", { className: "text-xs text-text-muted mb-3", children: "Automatically destroys your unlocked keys on this device after this much time with no activity anywhere in the app - not just Mail or Settings. Applies the next time you open or reload the app." }), _jsx("select", { "aria-label": "Session timeout", className: "text-sm border border-border rounded-sm py-1.5 px-2 bg-surface", value: idleTimeoutMinutes, onChange: handleIdleTimeoutChange, children: IDLE_TIMEOUT_OPTIONS_MINUTES.map((minutes) => (_jsx("option", { value: minutes, children: idleTimeoutLabel(minutes) }, minutes))) })] }), _jsxs("div", { children: [_jsx("h2", { className: "text-sm font-semibold mb-2", children: "Local search index size" }), _jsxs("p", { className: "text-xs text-text-muted mb-3", children: ["How much decrypted mail this device keeps in a local encrypted search index, so recent search results and inbox previews work instantly without contacting the server every time. Defaults to ", localIndexDefaultByteBudgetLabel, " on this device. Applies the next time this mailbox\u2019s index rebuilds (e.g. the next time you unlock it) \u2014 lowering it doesn\u2019t delete anything already indexed elsewhere, it just narrows what this device keeps a local copy of."] }), _jsx("select", { "aria-label": "Local search index size", className: "text-sm border border-border rounded-sm py-1.5 px-2 bg-surface", value: localIndexByteBudget, onChange: handleLocalIndexByteBudgetChange, children: LOCAL_INDEX_SIZE_OPTIONS.map((option) => (_jsx("option", { value: option.bytes, children: option.label }, option.bytes))) })] }), _jsxs("div", { children: [_jsx("h2", { className: "text-sm font-semibold mb-2", children: "This session" }), _jsx("p", { className: "text-xs text-text-muted mb-3", children: "Removes your unlocked keys from this browser tab\u2019s memory right now, without affecting any other device. You\u2019ll be asked to unlock again the next time you read or send encrypted mail here." }), _jsx(Button, { type: "button", variant: "secondary", className: "!w-auto text-danger", onClick: handleDestroyKeysNow, children: "Destroy keys on this device now" })] })] }) }));
|
|
784
784
|
}
|
|
785
|
-
export default
|
|
785
|
+
export default SettingsEncryptionPage;
|
|
786
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
787
|
+
export const title = pageTitle("Settings");
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { SettingsShellProps } from "../../../shared/components/settings/layout/SettingsShell.js";
|
|
2
3
|
export type MailFilterDetailPageProps = Omit<SettingsShellProps, "active"> & {
|
|
3
4
|
params: {
|
|
4
5
|
uid: string;
|
|
5
6
|
};
|
|
6
7
|
};
|
|
7
|
-
declare
|
|
8
|
-
export default
|
|
8
|
+
declare function MailFilterDetailPage(props: MailFilterDetailPageProps): React.JSX.Element;
|
|
9
|
+
export default MailFilterDetailPage;
|
|
10
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
11
|
+
export declare const title: (props: {
|
|
12
|
+
branding?: Pick<import("@rapidmx/react-shared/branding/brandingApi.js").Branding, "title" | "companyName"> | null;
|
|
13
|
+
}) => string;
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
4
4
|
// SPDX-License-Identifier: MPL-2.0
|
|
5
5
|
///////////////////////////////////////////////////////////////////////////////
|
|
6
|
-
import {
|
|
6
|
+
import { pageTitle } from "../../../shared/navigation/pageTitle.js";
|
|
7
7
|
import { useEffect, useState } from "react";
|
|
8
8
|
import { ApiRequestError } from "@rapidmx/react-shared/util/api.js";
|
|
9
9
|
import { listFolders } from "@rapidmx/react-shared/mail/mailApi.js";
|
|
@@ -110,4 +110,6 @@ function MailFilterDetailContent({ uid }) {
|
|
|
110
110
|
}
|
|
111
111
|
return (_jsx("div", { className: "flex-1 min-w-0 overflow-y-auto p-6", children: _jsxs("div", { className: "max-w-3xl", children: [_jsx("a", { href: `/settings/filters?mailboxUid=${encodeURIComponent(mailboxUid)}`, className: "text-sm text-primary-dark hover:underline", children: "\u2190 All mail filters" }), _jsx("h1", { className: "text-lg font-bold tracking-tight mt-1 mb-5", children: original.name }), error && _jsx(Alert, { children: error }), saved && !error && _jsx("div", { className: "mb-4 text-sm text-success font-medium", children: "Saved." }), _jsxs("form", { onSubmit: handleSubmit, className: "flex flex-col gap-5", children: [_jsx("div", { className: "bg-surface border border-border rounded-md p-6", children: _jsx(FormField, { label: "Name", htmlFor: "name", children: _jsx("input", { id: "name", type: "text", className: INPUT_CLASS, value: name, onChange: (e) => setName(e.target.value) }) }) }), _jsx(RuleBuilder, { value: rule, onChange: setRule, conditionFields: MAIL_FILTER_CONDITION_FIELDS, actionTypes: buildMailFilterActionTypes(folders), showValidation: showValidation }), _jsx("div", { children: _jsx(Button, { type: "submit", loading: saving, disabled: saving, className: "!w-auto", children: "Save changes" }) })] })] }) }));
|
|
112
112
|
}
|
|
113
|
-
export default
|
|
113
|
+
export default MailFilterDetailPage;
|
|
114
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
115
|
+
export const title = pageTitle("Settings");
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { SettingsShellProps } from "../../../shared/components/settings/layout/SettingsShell.js";
|
|
2
3
|
export type SettingsFiltersPageProps = Omit<SettingsShellProps, "active">;
|
|
3
|
-
declare
|
|
4
|
-
export default
|
|
4
|
+
declare function SettingsFiltersPage(props: SettingsFiltersPageProps): React.JSX.Element;
|
|
5
|
+
export default SettingsFiltersPage;
|
|
6
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
7
|
+
export declare const title: (props: {
|
|
8
|
+
branding?: Pick<import("@rapidmx/react-shared/branding/brandingApi.js").Branding, "title" | "companyName"> | null;
|
|
9
|
+
}) => string;
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
4
4
|
// SPDX-License-Identifier: MPL-2.0
|
|
5
5
|
///////////////////////////////////////////////////////////////////////////////
|
|
6
|
-
import {
|
|
6
|
+
import { pageTitle } from "../../../shared/navigation/pageTitle.js";
|
|
7
7
|
import { useEffect, useState } from "react";
|
|
8
8
|
import { ApiRequestError } from "@rapidmx/react-shared/util/api.js";
|
|
9
9
|
import { listMailFilterRules } from "@rapidmx/react-shared/mail/mailFilterRulesApi.js";
|
|
@@ -29,4 +29,6 @@ function FiltersContent() {
|
|
|
29
29
|
const sorted = [...rules].sort((a, b) => a.sequence - b.sequence);
|
|
30
30
|
return (_jsx("div", { className: "flex-1 min-w-0 overflow-y-auto p-6", children: _jsxs("div", { className: "max-w-3xl", children: [_jsxs("div", { className: "flex items-center justify-between mb-5", children: [_jsx("h1", { className: "text-lg font-bold tracking-tight", children: "Mail Filters" }), _jsx("a", { href: `/settings/filters/new?mailboxUid=${encodeURIComponent(mailboxUid)}`, children: _jsx(Button, { type: "button", className: "!w-auto", children: "+ New filter" }) })] }), _jsx("p", { className: "text-sm text-text-muted mb-4", children: "Applied in order once a message is verdicted safe to deliver, before it reaches your Inbox." }), error && _jsx(Alert, { children: error }), loading ? (_jsx("p", { className: "text-sm text-text-muted", children: "Loading\u2026" })) : sorted.length === 0 ? (_jsx("p", { className: "text-sm text-text-muted", children: "No mail filters yet." })) : (_jsx("div", { className: "overflow-x-auto", children: _jsxs("table", { className: "w-full text-sm border-collapse", children: [_jsx("thead", { children: _jsx("tr", { children: ["Sequence", "Name", "Enabled", "Actions", ""].map((h) => (_jsx("th", { className: "text-left text-xs uppercase tracking-wide text-text-muted py-2 px-2.5 border-b border-border", children: h }, h))) }) }), _jsx("tbody", { children: sorted.map((rule) => (_jsxs("tr", { children: [_jsx("td", { className: "py-2.5 px-2.5 border-b border-border", children: rule.sequence }), _jsx("td", { className: "py-2.5 px-2.5 border-b border-border", children: rule.name }), _jsx("td", { className: "py-2.5 px-2.5 border-b border-border", children: rule.enabled ? "Yes" : "No" }), _jsx("td", { className: "py-2.5 px-2.5 border-b border-border", children: rule.actions.length }), _jsx("td", { className: "py-2.5 px-2.5 border-b border-border text-right", children: _jsx("a", { href: `/settings/filters/${encodeURIComponent(rule.uid)}?mailboxUid=${encodeURIComponent(mailboxUid)}`, className: "text-primary-dark hover:underline font-medium", children: "View" }) })] }, rule.uid))) })] }) }))] }) }));
|
|
31
31
|
}
|
|
32
|
-
export default
|
|
32
|
+
export default SettingsFiltersPage;
|
|
33
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
34
|
+
export const title = pageTitle("Settings");
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { SettingsShellProps } from "../../../../shared/components/settings/layout/SettingsShell.js";
|
|
2
3
|
export type NewMailFilterPageProps = Omit<SettingsShellProps, "active">;
|
|
3
|
-
declare
|
|
4
|
-
export default
|
|
4
|
+
declare function NewMailFilterPage(props: NewMailFilterPageProps): React.JSX.Element;
|
|
5
|
+
export default NewMailFilterPage;
|
|
6
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
7
|
+
export declare const title: (props: {
|
|
8
|
+
branding?: Pick<import("@rapidmx/react-shared/branding/brandingApi.js").Branding, "title" | "companyName"> | null;
|
|
9
|
+
}) => string;
|
|
@@ -3,8 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
4
4
|
// SPDX-License-Identifier: MPL-2.0
|
|
5
5
|
///////////////////////////////////////////////////////////////////////////////
|
|
6
|
-
import {
|
|
7
|
-
import { useNavigate } from "../../../../shared/navigation/
|
|
6
|
+
import { pageTitle } from "../../../../shared/navigation/pageTitle.js";
|
|
7
|
+
import { useNavigate } from "../../../../shared/navigation/index.js";
|
|
8
8
|
import { useEffect, useState } from "react";
|
|
9
9
|
import { ApiRequestError } from "@rapidmx/react-shared/util/api.js";
|
|
10
10
|
import { listFolders } from "@rapidmx/react-shared/mail/mailApi.js";
|
|
@@ -20,17 +20,38 @@ const INPUT_CLASS = "w-full text-sm py-2.5 px-3 border border-border rounded-sm
|
|
|
20
20
|
function NewMailFilterPage(props) {
|
|
21
21
|
return (_jsx(SettingsShell, { ...props, active: "filters", children: _jsx(NewMailFilterForm, {}) }));
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* What "Create rule" on a message (the reading pane's More actions menu) asks this page to start with: `?from=` and `?subject=` become the
|
|
25
|
+
* filter's "From contains" and "Subject contains" conditions, and the name says whose mail it is. The reader keeps, changes or removes them.
|
|
26
|
+
*/
|
|
27
|
+
function prefillFromSearch(search) {
|
|
28
|
+
const params = new URLSearchParams(search);
|
|
29
|
+
const from = params.get("from")?.trim();
|
|
30
|
+
const subject = params.get("subject")?.trim();
|
|
31
|
+
const conditions = {};
|
|
32
|
+
if (from) {
|
|
33
|
+
conditions.fromContains = [from];
|
|
34
|
+
}
|
|
35
|
+
if (subject) {
|
|
36
|
+
conditions.subjectContains = [subject];
|
|
37
|
+
}
|
|
38
|
+
return { name: from ? `Messages from ${from}` : "", conditions };
|
|
39
|
+
}
|
|
23
40
|
function NewMailFilterForm() {
|
|
24
41
|
const navigate = useNavigate();
|
|
25
42
|
const { mailboxUid } = useSettingsShell();
|
|
43
|
+
// Read once, when the form opens, and what the reader then edits is theirs. From the browser's own location rather than the router's (which a shallow
|
|
44
|
+
// navigation could change under the form): this form is only mounted once the shell has fetched the mailbox, in the browser, so there is no
|
|
45
|
+
// server render for the two to disagree with.
|
|
46
|
+
const [prefill] = useState(() => prefillFromSearch(window.location.search));
|
|
26
47
|
const [folders, setFolders] = useState(null);
|
|
27
48
|
const [folderError, setFolderError] = useState(null);
|
|
28
|
-
const [name, setName] = useState(
|
|
49
|
+
const [name, setName] = useState(prefill.name);
|
|
29
50
|
const [rule, setRule] = useState({
|
|
30
51
|
enabled: true,
|
|
31
52
|
sequence: 0,
|
|
32
53
|
stopProcessingRules: false,
|
|
33
|
-
conditions:
|
|
54
|
+
conditions: prefill.conditions,
|
|
34
55
|
actions: [],
|
|
35
56
|
});
|
|
36
57
|
const [error, setError] = useState(null);
|
|
@@ -70,4 +91,6 @@ function NewMailFilterForm() {
|
|
|
70
91
|
}
|
|
71
92
|
return (_jsx("div", { className: "flex-1 min-w-0 overflow-y-auto p-6", children: _jsxs("div", { className: "max-w-3xl", children: [_jsx("h1", { className: "text-lg font-bold tracking-tight mb-1", children: "New mail filter" }), _jsx("p", { className: "text-sm text-text-muted mb-5", children: "Applied in order once a message is verdicted safe to deliver, before it reaches your Inbox." }), error && _jsx(Alert, { children: error }), folderError && _jsx(Alert, { children: folderError }), folders === null ? (_jsx("p", { className: "text-sm text-text-muted", children: "Loading\u2026" })) : (_jsxs("form", { onSubmit: handleSubmit, className: "flex flex-col gap-5", children: [_jsx("div", { className: "bg-surface border border-border rounded-md p-6", children: _jsx(FormField, { label: "Name", htmlFor: "name", children: _jsx("input", { id: "name", type: "text", className: INPUT_CLASS, value: name, onChange: (e) => setName(e.target.value), placeholder: "File newsletters" }) }) }), _jsx(RuleBuilder, { value: rule, onChange: setRule, conditionFields: MAIL_FILTER_CONDITION_FIELDS, actionTypes: buildMailFilterActionTypes(folders), showValidation: showValidation }), _jsxs("div", { className: "flex gap-3", children: [_jsx(Button, { type: "submit", loading: saving, disabled: saving, className: "!w-auto", children: "Create filter" }), _jsx("a", { href: `/settings/filters?mailboxUid=${encodeURIComponent(mailboxUid)}`, children: _jsx(Button, { type: "button", variant: "secondary", className: "!w-auto", children: "Cancel" }) })] })] }))] }) }));
|
|
72
93
|
}
|
|
73
|
-
export default
|
|
94
|
+
export default NewMailFilterPage;
|
|
95
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
96
|
+
export const title = pageTitle("Settings");
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { SettingsShellProps } from "../../../shared/components/settings/layout/SettingsShell.js";
|
|
2
3
|
export type SettingsLabelsPageProps = Omit<SettingsShellProps, "active">;
|
|
3
|
-
declare
|
|
4
|
-
export default
|
|
4
|
+
declare function SettingsLabelsPage(props: SettingsLabelsPageProps): React.JSX.Element;
|
|
5
|
+
export default SettingsLabelsPage;
|
|
6
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
7
|
+
export declare const title: (props: {
|
|
8
|
+
branding?: Pick<import("@rapidmx/react-shared/branding/brandingApi.js").Branding, "title" | "companyName"> | null;
|
|
9
|
+
}) => string;
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
4
4
|
// SPDX-License-Identifier: MPL-2.0
|
|
5
5
|
///////////////////////////////////////////////////////////////////////////////
|
|
6
|
-
import {
|
|
6
|
+
import { pageTitle } from "../../../shared/navigation/pageTitle.js";
|
|
7
7
|
import { useEffect, useState } from "react";
|
|
8
8
|
import { ApiRequestError } from "@rapidmx/react-shared/util/api.js";
|
|
9
9
|
import { createLabel, deleteLabel, listLabels, updateLabel } from "@rapidmx/react-shared/mail/labelsApi.js";
|
|
@@ -94,4 +94,6 @@ function LabelsContent() {
|
|
|
94
94
|
setDeleteError(null);
|
|
95
95
|
}, children: "Delete" })] })] }, label.uid))) }))] }), _jsxs(Modal, { open: formOpen, onClose: () => setFormOpen(false), title: editing ? "Edit label" : "New label", children: [formError && _jsx(Alert, { children: formError }), _jsx(FormField, { label: "Name", htmlFor: "label-name", children: _jsx("input", { id: "label-name", type: "text", value: formName, onChange: (e) => setFormName(e.target.value), className: "w-full text-sm px-3 py-1.5 rounded-md border border-border bg-surface" }) }), _jsx(FormField, { label: "Color", htmlFor: "label-color", children: _jsx("input", { id: "label-color", type: "color", value: formColor, onChange: (e) => setFormColor(e.target.value), className: "h-9 w-16 rounded-md border border-border bg-surface" }) }), _jsxs("div", { className: "flex justify-end gap-2 mt-2", children: [_jsx(Button, { type: "button", variant: "secondary", className: "!w-auto", onClick: () => setFormOpen(false), children: "Cancel" }), _jsx(Button, { type: "button", className: "!w-auto", loading: saving, disabled: saving || !formName.trim(), onClick: handleSave, children: "Save" })] })] }), _jsxs(Modal, { open: !!deleting, onClose: () => setDeleting(null), title: "Delete this label?", children: [deleteError && _jsx(Alert, { children: deleteError }), _jsxs("p", { className: "text-sm text-text-muted mb-4", children: ["This removes \u201C", deleting?.name, "\u201D from every message it's applied to. This can't be undone."] }), _jsxs("div", { className: "flex justify-end gap-2", children: [_jsx(Button, { type: "button", variant: "secondary", className: "!w-auto", onClick: () => setDeleting(null), children: "Cancel" }), _jsx(Button, { type: "button", className: "!w-auto", loading: deleteBusy, disabled: deleteBusy, onClick: handleDelete, children: "Delete label" })] })] })] }));
|
|
96
96
|
}
|
|
97
|
-
export default
|
|
97
|
+
export default SettingsLabelsPage;
|
|
98
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
99
|
+
export const title = pageTitle("Settings");
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { SettingsShellProps } from "../../../shared/components/settings/layout/SettingsShell.js";
|
|
2
3
|
export type SettingsPrivacyPageProps = Omit<SettingsShellProps, "active">;
|
|
3
|
-
declare
|
|
4
|
-
export default
|
|
4
|
+
declare function SettingsPrivacyPage(props: SettingsPrivacyPageProps): React.JSX.Element;
|
|
5
|
+
export default SettingsPrivacyPage;
|
|
6
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
7
|
+
export declare const title: (props: {
|
|
8
|
+
branding?: Pick<import("@rapidmx/react-shared/branding/brandingApi.js").Branding, "title" | "companyName"> | null;
|
|
9
|
+
}) => string;
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
4
4
|
// SPDX-License-Identifier: MPL-2.0
|
|
5
5
|
///////////////////////////////////////////////////////////////////////////////
|
|
6
|
-
import {
|
|
6
|
+
import { pageTitle } from "../../../shared/navigation/pageTitle.js";
|
|
7
7
|
import { useEffect, useRef, useState } from "react";
|
|
8
8
|
import { ApiRequestError } from "@rapidmx/react-shared/util/api.js";
|
|
9
9
|
import { createExportRequest, exportRequestDownloadUrl, listExportRequests, } from "@rapidmx/react-shared/mail/dataExportApi.js";
|
|
@@ -198,4 +198,6 @@ function ErasureSection({ mailboxLabel }) {
|
|
|
198
198
|
}
|
|
199
199
|
return (_jsxs("div", { children: [_jsx("h2", { className: "text-sm font-semibold mb-2", children: "Delete my account" }), _jsxs("p", { className: "text-xs text-text-muted mb-3", children: ["Permanently and irreversibly deletes ", _jsx("strong", { children: mailboxLabel }), " and everything in it, once a compliance administrator reviews and approves the request. There is no way to cancel a request or undo the deletion once it runs."] }), loadError && _jsx(Alert, { children: loadError }), loading ? (_jsx("p", { className: "text-sm text-text-muted", children: "Loading\u2026" })) : (_jsxs(_Fragment, { children: [requests.length > 0 && (_jsx("ul", { className: "flex flex-col gap-2 mb-3", children: requests.map((request) => (_jsxs("li", { className: "flex items-center justify-between gap-3 text-sm py-1.5 px-3 bg-surface-alt rounded-sm", children: [_jsxs("span", { children: [new Date(request.dateCreated).toLocaleString(), request.status === "denied" && request.reason && (_jsxs("span", { className: "text-danger", children: [" \u2014 ", request.reason] }))] }), _jsx("span", { className: `text-xs font-bold uppercase tracking-wide py-0.5 px-2 rounded-pill ${statusBadgeClass(request.status)}`, children: statusLabel(request.status) })] }, request.uid))) })), _jsx(Button, { type: "button", variant: "secondary", className: "!w-auto !border-danger !text-danger hover:!border-danger hover:!text-danger", disabled: hasPending, onClick: () => setConfirming(true), children: "Request account erasure" })] })), _jsxs(Modal, { open: confirming, onClose: closeConfirm, title: "Delete my account", children: [_jsxs("p", { className: "text-sm mb-5", children: ["This permanently deletes ", mailboxLabel, " and everything in it \u2014 messages, contacts, calendar, tasks, and notes \u2014 once approved. This cannot be undone and cannot be cancelled once submitted."] }), createError && _jsx(Alert, { children: createError }), _jsxs("div", { className: "flex gap-3 justify-end mt-5", children: [_jsx(Button, { type: "button", variant: "secondary", className: "!w-auto", disabled: creating, onClick: closeConfirm, children: "Cancel" }), _jsx(Button, { type: "button", className: "!w-auto !bg-none !bg-danger !border-danger hover:!bg-danger", loading: creating, disabled: creating, onClick: handleConfirm, children: "Request erasure" })] })] })] }));
|
|
200
200
|
}
|
|
201
|
-
export default
|
|
201
|
+
export default SettingsPrivacyPage;
|
|
202
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
203
|
+
export const title = pageTitle("Settings");
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { SettingsShellProps } from "../../../shared/components/settings/layout/SettingsShell.js";
|
|
2
3
|
export type SettingsProfilePageProps = Omit<SettingsShellProps, "active">;
|
|
3
|
-
declare
|
|
4
|
-
export default
|
|
4
|
+
declare function SettingsProfilePage(props: SettingsProfilePageProps): React.JSX.Element;
|
|
5
|
+
export default SettingsProfilePage;
|
|
6
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
7
|
+
export declare const title: (props: {
|
|
8
|
+
branding?: Pick<import("@rapidmx/react-shared/branding/brandingApi.js").Branding, "title" | "companyName"> | null;
|
|
9
|
+
}) => string;
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
4
4
|
// SPDX-License-Identifier: MPL-2.0
|
|
5
5
|
///////////////////////////////////////////////////////////////////////////////
|
|
6
|
-
import {
|
|
6
|
+
import { pageTitle } from "../../../shared/navigation/pageTitle.js";
|
|
7
7
|
import { useMemo, useState } from "react";
|
|
8
8
|
import { freeBusyVisibilityOf, isSharedWithMe, updateMailbox } from "@rapidmx/react-shared/mail/mailApi.js";
|
|
9
9
|
import { DEFAULT_TIME_ZONE, deviceTimeZone, timeZoneOptions } from "@rapidmx/react-shared/util/timeZone.js";
|
|
@@ -121,4 +121,6 @@ function ProfileContent() {
|
|
|
121
121
|
setSaved(false);
|
|
122
122
|
}, "aria-describedby": "profile-free-busy-help", children: FREE_BUSY_CHOICES.map((choice) => (_jsx("option", { value: choice.value, children: choice.label }, choice.value))) }), _jsx("p", { id: "profile-free-busy-help", className: "mt-1 text-xs text-text-muted", children: FREE_BUSY_CHOICES.find((choice) => choice.value === freeBusy).help }), _jsx("p", { className: "mt-1 text-xs text-text-muted", children: "Who can see the hours you are busy when they look for a time to meet - never the title, place or guests of an event." }), !canChangeFreeBusy && (_jsx("p", { className: "mt-1 text-xs text-text-muted", children: "This mailbox is shared with you: only its owner can change who sees its free/busy times." }))] }), _jsx("div", { children: _jsx(Button, { type: "submit", loading: saving, disabled: saving, className: "!w-auto", children: "Save" }) })] })] }) }));
|
|
123
123
|
}
|
|
124
|
-
export default
|
|
124
|
+
export default SettingsProfilePage;
|
|
125
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
126
|
+
export const title = pageTitle("Settings");
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { SettingsShellProps } from "../../../shared/components/settings/layout/SettingsShell.js";
|
|
2
3
|
export type SettingsReadReceiptsPageProps = Omit<SettingsShellProps, "active">;
|
|
3
|
-
declare
|
|
4
|
-
export default
|
|
4
|
+
declare function SettingsReadReceiptsPage(props: SettingsReadReceiptsPageProps): React.JSX.Element;
|
|
5
|
+
export default SettingsReadReceiptsPage;
|
|
6
|
+
/** The tab's title: `Brand: Settings` (see `pageTitle()`). */
|
|
7
|
+
export declare const title: (props: {
|
|
8
|
+
branding?: Pick<import("@rapidmx/react-shared/branding/brandingApi.js").Branding, "title" | "companyName"> | null;
|
|
9
|
+
}) => string;
|