feat: route email notifications through mail capability
This commit is contained in:
@@ -77,6 +77,8 @@ export type NotificationDeliveryResult = {
|
||||
notification?: NotificationMessage | null;
|
||||
processed: number;
|
||||
sent: number;
|
||||
accepted: number;
|
||||
paused: number;
|
||||
failed: number;
|
||||
skipped: number;
|
||||
errors: string[];
|
||||
|
||||
@@ -4,9 +4,30 @@ import { AdminIconButton, Button, DismissibleAlert, SegmentedControl, SelectionL
|
||||
import { deliverPendingNotifications, listNotifications, updateNotification, type NotificationMessage } from "../../api/notifications";
|
||||
import { safeNotificationActionUrl } from "../../security/actionUrl";
|
||||
|
||||
type StatusFilter = "all" | "pending" | "queued" | "sent" | "failed" | "skipped" | "cancelled";
|
||||
type StatusFilter =
|
||||
| "all"
|
||||
| "pending"
|
||||
| "queued"
|
||||
| "sending"
|
||||
| "accepted"
|
||||
| "paused"
|
||||
| "sent"
|
||||
| "failed"
|
||||
| "skipped"
|
||||
| "cancelled";
|
||||
|
||||
const statusFilters: StatusFilter[] = ["all", "pending", "queued", "sent", "failed", "skipped", "cancelled"];
|
||||
const statusFilters: StatusFilter[] = [
|
||||
"all",
|
||||
"pending",
|
||||
"queued",
|
||||
"sending",
|
||||
"accepted",
|
||||
"paused",
|
||||
"sent",
|
||||
"failed",
|
||||
"skipped",
|
||||
"cancelled"
|
||||
];
|
||||
|
||||
export default function NotificationCenterPage({ settings, auth }: { settings: ApiSettings; auth: AuthInfo }) {
|
||||
const [notifications, setNotifications] = useState<NotificationMessage[]>([]);
|
||||
|
||||
@@ -176,7 +176,7 @@ export default function NotificationSettingsPanel({ settings, auth }: { settings
|
||||
</div>
|
||||
<ToggleSwitch
|
||||
label="Email notifications"
|
||||
help="Prepared for mail-backed notification delivery."
|
||||
help="Deliver production email through the optional Mail module. In-app notifications continue to work when Mail is unavailable."
|
||||
checked={draft.email_enabled}
|
||||
disabled={loading}
|
||||
onChange={(value) => setDraft((current) => ({ ...current, email_enabled: value, email_digest_enabled: value ? current.email_digest_enabled : false }))}
|
||||
|
||||
Reference in New Issue
Block a user