@rapidmx/web-client 0.6.0 → 0.7.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/apps/shared/components/admin/settings/BrandingForm.tsx +398 -385
- package/apps/shared/components/admin/settings/EncryptionPolicyForm.tsx +119 -112
- package/apps/shared/components/admin/settings/MailboxPolicyForm.tsx +159 -152
- package/apps/shared/components/admin/settings/PluginsManager.tsx +1288 -1235
- package/apps/shared/components/admin/settings/RetentionPolicyForm.tsx +9 -1
- package/apps/shared/components/admin/setup/EscrowSetupStep.tsx +288 -290
- package/apps/shared/components/admin/setup/SetupWizard.tsx +443 -416
- package/apps/shared/components/layout/AppShell.tsx +288 -288
- package/apps/shared/components/mail/ConversationList.tsx +225 -33
- package/apps/shared/components/mail/ConversationThreadPane.tsx +434 -216
- package/apps/shared/components/mail/MailListToolbar.tsx +265 -0
- package/apps/shared/components/mail/MailSelectionBar.tsx +222 -0
- package/apps/shared/components/mail/MenuButton.tsx +384 -0
- package/apps/shared/components/mail/MessageDetailPane.tsx +280 -215
- package/apps/shared/components/mail/MoveToFolderDialog.tsx +263 -0
- package/apps/shared/components/mail/compose/ComposeContext.tsx +29 -2
- package/apps/shared/components/mail/compose/ComposeWindow.tsx +1700 -1652
- package/apps/shared/components/mail/compose/RecipientInput.tsx +356 -0
- package/apps/shared/components/mail/compose/RichTextEditor.tsx +38 -3
- package/apps/shared/components/mail/compose/quotedBody.ts +100 -0
- package/apps/shared/components/mail/compose/recipients.ts +104 -0
- package/apps/shared/components/mail/labelMenu.tsx +278 -0
- package/apps/shared/components/mail/layout/MailShell.tsx +445 -420
- package/apps/shared/components/mail/listPreferences.ts +228 -0
- package/apps/shared/components/settings/layout/SettingsShell.tsx +0 -1
- package/apps/shared/styles/app.css +28 -5
- package/apps/www/index.tsx +1854 -1314
- package/apps/www/messages/[uid].tsx +5 -4
- package/dist/apps/shared/components/admin/settings/BrandingForm.d.ts +7 -3
- package/dist/apps/shared/components/admin/settings/BrandingForm.js +6 -5
- package/dist/apps/shared/components/admin/settings/EncryptionPolicyForm.d.ts +4 -1
- package/dist/apps/shared/components/admin/settings/EncryptionPolicyForm.js +2 -2
- package/dist/apps/shared/components/admin/settings/MailboxPolicyForm.d.ts +4 -1
- package/dist/apps/shared/components/admin/settings/MailboxPolicyForm.js +2 -2
- package/dist/apps/shared/components/admin/settings/PluginsManager.d.ts +8 -1
- package/dist/apps/shared/components/admin/settings/PluginsManager.js +33 -14
- package/dist/apps/shared/components/admin/settings/RetentionPolicyForm.d.ts +4 -1
- package/dist/apps/shared/components/admin/settings/RetentionPolicyForm.js +2 -2
- package/dist/apps/shared/components/admin/setup/EscrowSetupStep.js +1 -1
- package/dist/apps/shared/components/admin/setup/SetupWizard.js +14 -10
- package/dist/apps/shared/components/mail/ConversationList.d.ts +42 -6
- package/dist/apps/shared/components/mail/ConversationList.js +84 -10
- package/dist/apps/shared/components/mail/ConversationThreadPane.d.ts +52 -13
- package/dist/apps/shared/components/mail/ConversationThreadPane.js +217 -60
- package/dist/apps/shared/components/mail/MailListToolbar.d.ts +55 -0
- package/dist/apps/shared/components/mail/MailListToolbar.js +149 -0
- package/dist/apps/shared/components/mail/MailSelectionBar.d.ts +59 -0
- package/dist/apps/shared/components/mail/MailSelectionBar.js +48 -0
- package/dist/apps/shared/components/mail/MenuButton.d.ts +71 -0
- package/dist/apps/shared/components/mail/MenuButton.js +211 -0
- package/dist/apps/shared/components/mail/MessageDetailPane.d.ts +27 -19
- package/dist/apps/shared/components/mail/MessageDetailPane.js +126 -129
- package/dist/apps/shared/components/mail/MoveToFolderDialog.d.ts +57 -0
- package/dist/apps/shared/components/mail/MoveToFolderDialog.js +138 -0
- package/dist/apps/shared/components/mail/compose/ComposeContext.d.ts +16 -1
- package/dist/apps/shared/components/mail/compose/ComposeContext.js +3 -1
- package/dist/apps/shared/components/mail/compose/ComposeWindow.js +52 -20
- package/dist/apps/shared/components/mail/compose/RecipientInput.d.ts +36 -0
- package/dist/apps/shared/components/mail/compose/RecipientInput.js +203 -0
- package/dist/apps/shared/components/mail/compose/RichTextEditor.d.ts +10 -1
- package/dist/apps/shared/components/mail/compose/RichTextEditor.js +21 -3
- package/dist/apps/shared/components/mail/compose/quotedBody.d.ts +37 -0
- package/dist/apps/shared/components/mail/compose/quotedBody.js +85 -0
- package/dist/apps/shared/components/mail/compose/recipients.d.ts +24 -0
- package/dist/apps/shared/components/mail/compose/recipients.js +87 -0
- package/dist/apps/shared/components/mail/labelMenu.d.ts +97 -0
- package/dist/apps/shared/components/mail/labelMenu.js +134 -0
- package/dist/apps/shared/components/mail/layout/MailShell.d.ts +8 -0
- package/dist/apps/shared/components/mail/layout/MailShell.js +15 -3
- package/dist/apps/shared/components/mail/listPreferences.d.ts +101 -0
- package/dist/apps/shared/components/mail/listPreferences.js +186 -0
- package/dist/apps/shared/components/settings/layout/SettingsShell.js +0 -1
- package/dist/apps/shared/styles/app.css +28 -5
- package/dist/apps/www/index.js +506 -112
- package/dist/apps/www/messages/[uid].js +2 -3
- package/package.json +2 -2
- package/apps/www/settings/focused-inbox/index.tsx +0 -150
- package/dist/apps/www/settings/focused-inbox/index.d.ts +0 -4
- package/dist/apps/www/settings/focused-inbox/index.js +0 -71
|
@@ -19,7 +19,7 @@ export default function MessageDetailPage(props) {
|
|
|
19
19
|
return (_jsx(MailShell, { ...props, children: _jsx(MessageDetailContent, { uid: props.params.uid }) }));
|
|
20
20
|
}
|
|
21
21
|
function MessageDetailContent({ uid }) {
|
|
22
|
-
const { mailboxFolders, mailboxUid } = useMailShell();
|
|
22
|
+
const { mailboxFolders, mailboxUid, onFolderCreated } = useMailShell();
|
|
23
23
|
const [message, setMessage] = useState(null);
|
|
24
24
|
const [loading, setLoading] = useState(true);
|
|
25
25
|
const [error, setError] = useState(null);
|
|
@@ -67,7 +67,6 @@ function MessageDetailContent({ uid }) {
|
|
|
67
67
|
const backHref = `/?mailboxUid=${encodeURIComponent(message.mailboxUid)}&folderUid=${encodeURIComponent(message.folderUid)}`;
|
|
68
68
|
const isSentItems = folders.find((f) => f.uid === message.folderUid)?.type === "sent_items";
|
|
69
69
|
const isOutbox = folders.find((f) => f.uid === message.folderUid)?.type === "outbox";
|
|
70
|
-
const isInbox = folders.find((f) => f.uid === message.folderUid)?.type === "inbox";
|
|
71
70
|
const draftsFolderUid = folders.find((f) => f.type === "drafts")?.uid;
|
|
72
|
-
return (_jsx(MessageDetailPane, { message: message, attachments: attachments, backHref: backHref, isSentItems: isSentItems, onRecalled: setMessage, isOutbox: isOutbox,
|
|
71
|
+
return (_jsx(MessageDetailPane, { 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]) }));
|
|
73
72
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rapidmx/web-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "RapidMX's webmail and admin console React UI for web-based clients.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "https://github.com/rapidmx/web-client",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@dnd-kit/core": "^6.3.1",
|
|
40
40
|
"@journeyapps/wa-sqlite": "^2.0.4",
|
|
41
41
|
"@peculiar/x509": "^2.1.0",
|
|
42
|
-
"@rapidmx/react-shared": "^0.
|
|
42
|
+
"@rapidmx/react-shared": "^0.7.0",
|
|
43
43
|
"@tiptap/core": "^3.31.3",
|
|
44
44
|
"@tiptap/extension-highlight": "^3.31.3",
|
|
45
45
|
"@tiptap/extension-image": "^3.31.3",
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
3
|
-
// SPDX-License-Identifier: MPL-2.0
|
|
4
|
-
///////////////////////////////////////////////////////////////////////////////
|
|
5
|
-
import React, { FormEvent, useEffect, useState } from "react";
|
|
6
|
-
import { ApiRequestError } from "@rapidmx/react-shared/util/api.js";
|
|
7
|
-
import { MessageClassification } from "@rapidmx/react-shared/mail/mailApi.js";
|
|
8
|
-
import {
|
|
9
|
-
FocusedInboxOverride,
|
|
10
|
-
createFocusedInboxOverride,
|
|
11
|
-
deleteFocusedInboxOverride,
|
|
12
|
-
listFocusedInboxOverrides,
|
|
13
|
-
} from "@rapidmx/react-shared/mail/focusedInboxOverridesApi.js";
|
|
14
|
-
import SettingsShell, { SettingsShellProps, useSettingsShell } from "../../../shared/components/settings/layout/SettingsShell.js";
|
|
15
|
-
import Alert from "@rapidmx/react-shared/components/feedback/Alert.js";
|
|
16
|
-
import Button from "@rapidmx/react-shared/components/buttons/Button.js";
|
|
17
|
-
|
|
18
|
-
export type SettingsFocusedInboxPageProps = Omit<SettingsShellProps, "active">;
|
|
19
|
-
|
|
20
|
-
export default function SettingsFocusedInboxPage(props: SettingsFocusedInboxPageProps) {
|
|
21
|
-
return (
|
|
22
|
-
<SettingsShell {...props} active="focused-inbox">
|
|
23
|
-
<FocusedInboxContent />
|
|
24
|
-
</SettingsShell>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function FocusedInboxContent() {
|
|
29
|
-
const { mailboxUid } = useSettingsShell();
|
|
30
|
-
const [overrides, setOverrides] = useState<FocusedInboxOverride[]>([]);
|
|
31
|
-
const [loading, setLoading] = useState(true);
|
|
32
|
-
const [error, setError] = useState<string | null>(null);
|
|
33
|
-
const [saving, setSaving] = useState(false);
|
|
34
|
-
const [newSender, setNewSender] = useState("");
|
|
35
|
-
const [newClassifyAs, setNewClassifyAs] = useState<MessageClassification>("other");
|
|
36
|
-
|
|
37
|
-
function reload() {
|
|
38
|
-
setLoading(true);
|
|
39
|
-
setError(null);
|
|
40
|
-
// `SettingsShell` only ever renders its children once `mailboxUid` has resolved — same
|
|
41
|
-
// established non-null pattern as `apps/www/settings/filters/index.tsx`.
|
|
42
|
-
listFocusedInboxOverrides(mailboxUid!)
|
|
43
|
-
.then(setOverrides)
|
|
44
|
-
.catch((err) => setError(err instanceof ApiRequestError ? err.message : "Could not load your Focused Inbox rules."))
|
|
45
|
-
.finally(() => setLoading(false));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
useEffect(reload, [mailboxUid]);
|
|
49
|
-
|
|
50
|
-
async function handleAdd(e: FormEvent) {
|
|
51
|
-
e.preventDefault();
|
|
52
|
-
// Lowercased to match restapi's own `normalizeAddress()` - what gets sent is exactly what gets
|
|
53
|
-
// stored and matched against, rather than relying on the server to silently rewrite it.
|
|
54
|
-
const senderAddress = newSender.trim().toLowerCase();
|
|
55
|
-
if (!senderAddress) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
setSaving(true);
|
|
59
|
-
setError(null);
|
|
60
|
-
try {
|
|
61
|
-
await createFocusedInboxOverride({ mailboxUid: mailboxUid!, senderAddress, classifyAs: newClassifyAs });
|
|
62
|
-
setNewSender("");
|
|
63
|
-
reload();
|
|
64
|
-
} catch (err) {
|
|
65
|
-
setError(err instanceof ApiRequestError ? err.message : "Could not add this rule.");
|
|
66
|
-
} finally {
|
|
67
|
-
setSaving(false);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
async function handleRemove(override: FocusedInboxOverride) {
|
|
72
|
-
setSaving(true);
|
|
73
|
-
setError(null);
|
|
74
|
-
try {
|
|
75
|
-
await deleteFocusedInboxOverride(override.uid, override.version);
|
|
76
|
-
reload();
|
|
77
|
-
} catch (err) {
|
|
78
|
-
setError(err instanceof ApiRequestError ? err.message : "Could not remove this rule.");
|
|
79
|
-
} finally {
|
|
80
|
-
setSaving(false);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return (
|
|
85
|
-
<div className="flex-1 min-w-0 overflow-y-auto p-6">
|
|
86
|
-
<div className="max-w-xl">
|
|
87
|
-
<h1 className="text-lg font-bold tracking-tight mb-1">Focused Inbox</h1>
|
|
88
|
-
<p className="text-sm text-text-muted mb-4">
|
|
89
|
-
Mail from a sender listed here always goes to the matching half of your Inbox, overriding
|
|
90
|
-
the automatic Focused/Other classification. Add one directly, or use “Always for this
|
|
91
|
-
sender” when moving a message.
|
|
92
|
-
</p>
|
|
93
|
-
|
|
94
|
-
{error && <Alert>{error}</Alert>}
|
|
95
|
-
|
|
96
|
-
{loading ? (
|
|
97
|
-
<p className="text-sm text-text-muted">Loading…</p>
|
|
98
|
-
) : (
|
|
99
|
-
<ul className="flex flex-col gap-2 mb-4">
|
|
100
|
-
{overrides.length === 0 && <li className="text-sm text-text-muted">No rules yet.</li>}
|
|
101
|
-
{overrides.map((override) => (
|
|
102
|
-
<li
|
|
103
|
-
key={override.uid}
|
|
104
|
-
className="flex items-center justify-between gap-3 py-2 px-3 border border-border rounded-sm"
|
|
105
|
-
>
|
|
106
|
-
<div>
|
|
107
|
-
<div className="text-sm font-medium">{override.senderAddress}</div>
|
|
108
|
-
<div className="text-xs text-text-muted">
|
|
109
|
-
Always {override.classifyAs === "other" ? "Other" : "Focused"}
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
<button
|
|
113
|
-
type="button"
|
|
114
|
-
onClick={() => handleRemove(override)}
|
|
115
|
-
disabled={saving}
|
|
116
|
-
className="text-sm text-danger hover:underline disabled:opacity-55"
|
|
117
|
-
>
|
|
118
|
-
Remove
|
|
119
|
-
</button>
|
|
120
|
-
</li>
|
|
121
|
-
))}
|
|
122
|
-
</ul>
|
|
123
|
-
)}
|
|
124
|
-
|
|
125
|
-
<form onSubmit={handleAdd} className="flex gap-2">
|
|
126
|
-
<input
|
|
127
|
-
type="text"
|
|
128
|
-
aria-label="Sender address"
|
|
129
|
-
value={newSender}
|
|
130
|
-
onChange={(e) => setNewSender(e.target.value)}
|
|
131
|
-
placeholder="sender@example.com"
|
|
132
|
-
className="flex-1 text-sm py-2 px-3 border border-border rounded-sm bg-surface text-text focus:outline-none focus:border-primary"
|
|
133
|
-
/>
|
|
134
|
-
<select
|
|
135
|
-
aria-label="Classify as"
|
|
136
|
-
value={newClassifyAs}
|
|
137
|
-
onChange={(e) => setNewClassifyAs(e.target.value as MessageClassification)}
|
|
138
|
-
className="text-sm py-2 px-3 border border-border rounded-sm bg-surface text-text focus:outline-none focus:border-primary"
|
|
139
|
-
>
|
|
140
|
-
<option value="other">Other</option>
|
|
141
|
-
<option value="focused">Focused</option>
|
|
142
|
-
</select>
|
|
143
|
-
<Button type="submit" loading={saving} disabled={saving} className="!w-auto">
|
|
144
|
-
Add
|
|
145
|
-
</Button>
|
|
146
|
-
</form>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
);
|
|
150
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { SettingsShellProps } from "../../../shared/components/settings/layout/SettingsShell.js";
|
|
3
|
-
export type SettingsFocusedInboxPageProps = Omit<SettingsShellProps, "active">;
|
|
4
|
-
export default function SettingsFocusedInboxPage(props: SettingsFocusedInboxPageProps): React.JSX.Element;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
///////////////////////////////////////////////////////////////////////////////
|
|
3
|
-
// Copyright (C) 2026 Jean-Philippe Steinmetz
|
|
4
|
-
// SPDX-License-Identifier: MPL-2.0
|
|
5
|
-
///////////////////////////////////////////////////////////////////////////////
|
|
6
|
-
import { useEffect, useState } from "react";
|
|
7
|
-
import { ApiRequestError } from "@rapidmx/react-shared/util/api.js";
|
|
8
|
-
import { createFocusedInboxOverride, deleteFocusedInboxOverride, listFocusedInboxOverrides, } from "@rapidmx/react-shared/mail/focusedInboxOverridesApi.js";
|
|
9
|
-
import SettingsShell, { useSettingsShell } from "../../../shared/components/settings/layout/SettingsShell.js";
|
|
10
|
-
import Alert from "@rapidmx/react-shared/components/feedback/Alert.js";
|
|
11
|
-
import Button from "@rapidmx/react-shared/components/buttons/Button.js";
|
|
12
|
-
export default function SettingsFocusedInboxPage(props) {
|
|
13
|
-
return (_jsx(SettingsShell, { ...props, active: "focused-inbox", children: _jsx(FocusedInboxContent, {}) }));
|
|
14
|
-
}
|
|
15
|
-
function FocusedInboxContent() {
|
|
16
|
-
const { mailboxUid } = useSettingsShell();
|
|
17
|
-
const [overrides, setOverrides] = useState([]);
|
|
18
|
-
const [loading, setLoading] = useState(true);
|
|
19
|
-
const [error, setError] = useState(null);
|
|
20
|
-
const [saving, setSaving] = useState(false);
|
|
21
|
-
const [newSender, setNewSender] = useState("");
|
|
22
|
-
const [newClassifyAs, setNewClassifyAs] = useState("other");
|
|
23
|
-
function reload() {
|
|
24
|
-
setLoading(true);
|
|
25
|
-
setError(null);
|
|
26
|
-
// `SettingsShell` only ever renders its children once `mailboxUid` has resolved — same
|
|
27
|
-
// established non-null pattern as `apps/www/settings/filters/index.tsx`.
|
|
28
|
-
listFocusedInboxOverrides(mailboxUid)
|
|
29
|
-
.then(setOverrides)
|
|
30
|
-
.catch((err) => setError(err instanceof ApiRequestError ? err.message : "Could not load your Focused Inbox rules."))
|
|
31
|
-
.finally(() => setLoading(false));
|
|
32
|
-
}
|
|
33
|
-
useEffect(reload, [mailboxUid]);
|
|
34
|
-
async function handleAdd(e) {
|
|
35
|
-
e.preventDefault();
|
|
36
|
-
// Lowercased to match restapi's own `normalizeAddress()` - what gets sent is exactly what gets
|
|
37
|
-
// stored and matched against, rather than relying on the server to silently rewrite it.
|
|
38
|
-
const senderAddress = newSender.trim().toLowerCase();
|
|
39
|
-
if (!senderAddress) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
setSaving(true);
|
|
43
|
-
setError(null);
|
|
44
|
-
try {
|
|
45
|
-
await createFocusedInboxOverride({ mailboxUid: mailboxUid, senderAddress, classifyAs: newClassifyAs });
|
|
46
|
-
setNewSender("");
|
|
47
|
-
reload();
|
|
48
|
-
}
|
|
49
|
-
catch (err) {
|
|
50
|
-
setError(err instanceof ApiRequestError ? err.message : "Could not add this rule.");
|
|
51
|
-
}
|
|
52
|
-
finally {
|
|
53
|
-
setSaving(false);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
async function handleRemove(override) {
|
|
57
|
-
setSaving(true);
|
|
58
|
-
setError(null);
|
|
59
|
-
try {
|
|
60
|
-
await deleteFocusedInboxOverride(override.uid, override.version);
|
|
61
|
-
reload();
|
|
62
|
-
}
|
|
63
|
-
catch (err) {
|
|
64
|
-
setError(err instanceof ApiRequestError ? err.message : "Could not remove this rule.");
|
|
65
|
-
}
|
|
66
|
-
finally {
|
|
67
|
-
setSaving(false);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
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: "Focused Inbox" }), _jsx("p", { className: "text-sm text-text-muted mb-4", children: "Mail from a sender listed here always goes to the matching half of your Inbox, overriding the automatic Focused/Other classification. Add one directly, or use \u201CAlways for this sender\u201D when moving a message." }), error && _jsx(Alert, { children: error }), loading ? (_jsx("p", { className: "text-sm text-text-muted", children: "Loading\u2026" })) : (_jsxs("ul", { className: "flex flex-col gap-2 mb-4", children: [overrides.length === 0 && _jsx("li", { className: "text-sm text-text-muted", children: "No rules yet." }), overrides.map((override) => (_jsxs("li", { className: "flex items-center justify-between gap-3 py-2 px-3 border border-border rounded-sm", children: [_jsxs("div", { children: [_jsx("div", { className: "text-sm font-medium", children: override.senderAddress }), _jsxs("div", { className: "text-xs text-text-muted", children: ["Always ", override.classifyAs === "other" ? "Other" : "Focused"] })] }), _jsx("button", { type: "button", onClick: () => handleRemove(override), disabled: saving, className: "text-sm text-danger hover:underline disabled:opacity-55", children: "Remove" })] }, override.uid)))] })), _jsxs("form", { onSubmit: handleAdd, className: "flex gap-2", children: [_jsx("input", { type: "text", "aria-label": "Sender address", value: newSender, onChange: (e) => setNewSender(e.target.value), placeholder: "sender@example.com", className: "flex-1 text-sm py-2 px-3 border border-border rounded-sm bg-surface text-text focus:outline-none focus:border-primary" }), _jsxs("select", { "aria-label": "Classify as", value: newClassifyAs, onChange: (e) => setNewClassifyAs(e.target.value), className: "text-sm py-2 px-3 border border-border rounded-sm bg-surface text-text focus:outline-none focus:border-primary", children: [_jsx("option", { value: "other", children: "Other" }), _jsx("option", { value: "focused", children: "Focused" })] }), _jsx(Button, { type: "submit", loading: saving, disabled: saving, className: "!w-auto", children: "Add" })] })] }) }));
|
|
71
|
-
}
|