Add Sonner-based notifications and UX polish

This commit is contained in:
MOH
2026-03-10 17:43:26 +01:00
parent eceb0f3a54
commit 77cc9dca87
32 changed files with 279 additions and 310 deletions
+1 -22
View File
@@ -1,7 +1,6 @@
import { redirect } from "next/navigation";
import { MotionFade } from "@/components/motion-fade";
import { FlashMessage } from "@/components/root/flash-message";
import { RootDashboardShell } from "@/components/root/root-dashboard-shell";
import { SMTPSettingsForm } from "@/components/root/smtp-settings-form";
import { Button } from "@/components/ui/button";
@@ -27,14 +26,7 @@ const copy = {
backToSite: "Zur Website",
};
type RootSMTPPageProps = {
searchParams?: {
success?: string;
error?: string;
};
};
export default async function RootSMTPPage({ searchParams }: RootSMTPPageProps) {
export default async function RootSMTPPage() {
if (!isAdminAuthenticated()) {
redirect("/root");
}
@@ -57,7 +49,6 @@ export default async function RootSMTPPage({ searchParams }: RootSMTPPageProps)
headerTitle={copy.title}
headerDescription={copy.subtitle}
saveFormId="smtp-settings-form"
reloadDocumentOnSave
headerActions={(
<form action={sendTestEmailAction}>
<Button type="submit" variant="outline">
@@ -67,18 +58,6 @@ export default async function RootSMTPPage({ searchParams }: RootSMTPPageProps)
)}
>
<div className="space-y-6">
{searchParams?.success ? (
<MotionFade delay={0.1}>
<FlashMessage type="success" message={searchParams.success} />
</MotionFade>
) : null}
{searchParams?.error ? (
<MotionFade delay={0.12}>
<FlashMessage type="error" message={searchParams.error} />
</MotionFade>
) : null}
<MotionFade delay={0.16}>
<SMTPSettingsForm
action={saveMailSettingsAction}