Add SMTP admin settings and contact form delivery

This commit is contained in:
MOH
2026-03-08 06:27:09 +01:00
parent 993a4673d8
commit 5ca4819bcb
28 changed files with 2087 additions and 55 deletions
+26 -1
View File
@@ -3,6 +3,7 @@ import {
Globe2,
ImageIcon,
LayoutDashboard,
Mail,
PlusSquare,
ShieldAlert,
SwatchBook,
@@ -17,6 +18,8 @@ type RootNavigationCopy = {
portfolio: string;
media: string;
siteSettings: string;
smtp?: string;
contactProtection?: string;
};
export type RootNavItem = {
@@ -30,7 +33,8 @@ export type RootNavItem = {
export function getRootNavigation(
copy: RootNavigationCopy,
active: "overview" | "maintenance" | "ui-kit" | "portfolio" | "media" | "site-settings",
active: "overview" | "maintenance" | "ui-kit" | "portfolio" | "media" | "site-settings" | "smtp",
smtpChild?: "settings" | "contact-protection",
portfolioChild?: "overview" | "projects" | "new-project" | "categories",
): RootNavItem[] {
return [
@@ -64,6 +68,27 @@ export function getRootNavigation(
icon: Globe2,
active: active === "site-settings",
},
{
label: copy.smtp ?? "SMTP",
href: "/root/smtp",
icon: Mail,
active: active === "smtp" && !smtpChild,
expanded: active === "smtp",
children: [
{
label: copy.smtp ?? "SMTP",
href: "/root/smtp",
icon: Mail,
active: smtpChild === "settings" || (!smtpChild && active === "smtp"),
},
{
label: copy.contactProtection ?? "Contact Protection",
href: "/root/smtp/contact-protection",
icon: ShieldAlert,
active: smtpChild === "contact-protection",
},
],
},
{
label: copy.portfolio,
href: "/root/portfolio",