Add dedicated local admin domain routing
This commit is contained in:
+14
-13
@@ -11,6 +11,7 @@ import {
|
||||
Type,
|
||||
type LucideIcon,
|
||||
} from "lucide-react";
|
||||
import { getAdminAppPath } from "@/lib/admin-routing";
|
||||
|
||||
type AdminNavigationCopy = {
|
||||
overview: string;
|
||||
@@ -42,56 +43,56 @@ export function getAdminNavigation(
|
||||
return [
|
||||
{
|
||||
label: copy.overview,
|
||||
href: "/",
|
||||
href: getAdminAppPath("/"),
|
||||
icon: LayoutDashboard,
|
||||
active: active === "overview",
|
||||
},
|
||||
{
|
||||
label: copy.maintenance,
|
||||
href: "/maintenance",
|
||||
href: getAdminAppPath("/maintenance"),
|
||||
icon: ShieldAlert,
|
||||
active: active === "maintenance",
|
||||
},
|
||||
{
|
||||
label: copy.uiKit,
|
||||
href: "/ui-kit",
|
||||
href: getAdminAppPath("/ui-kit"),
|
||||
icon: SwatchBook,
|
||||
active: active === "ui-kit",
|
||||
},
|
||||
{
|
||||
label: copy.media,
|
||||
href: "/media",
|
||||
href: getAdminAppPath("/media"),
|
||||
icon: ImageIcon,
|
||||
active: active === "media",
|
||||
},
|
||||
{
|
||||
label: copy.siteSettings,
|
||||
href: "/site-settings",
|
||||
href: getAdminAppPath("/site-settings"),
|
||||
icon: Globe2,
|
||||
active: active === "site-settings",
|
||||
},
|
||||
{
|
||||
label: copy.marquee ?? "Marquee",
|
||||
href: "/marquee",
|
||||
href: getAdminAppPath("/marquee"),
|
||||
icon: Type,
|
||||
active: active === "marquee",
|
||||
},
|
||||
{
|
||||
label: copy.smtp ?? "SMTP",
|
||||
href: "/smtp",
|
||||
href: getAdminAppPath("/smtp"),
|
||||
icon: Mail,
|
||||
active: active === "smtp" && !smtpChild,
|
||||
expanded: active === "smtp",
|
||||
children: [
|
||||
{
|
||||
label: copy.smtp ?? "SMTP",
|
||||
href: "/smtp",
|
||||
href: getAdminAppPath("/smtp"),
|
||||
icon: Mail,
|
||||
active: smtpChild === "settings" || (!smtpChild && active === "smtp"),
|
||||
},
|
||||
{
|
||||
label: copy.contactProtection ?? "Contact Protection",
|
||||
href: "/smtp/contact-protection",
|
||||
href: getAdminAppPath("/smtp/contact-protection"),
|
||||
icon: ShieldAlert,
|
||||
active: smtpChild === "contact-protection",
|
||||
},
|
||||
@@ -99,26 +100,26 @@ export function getAdminNavigation(
|
||||
},
|
||||
{
|
||||
label: copy.portfolio,
|
||||
href: "/portfolio",
|
||||
href: getAdminAppPath("/portfolio"),
|
||||
icon: FolderKanban,
|
||||
active: active === "portfolio" && !portfolioChild,
|
||||
expanded: active === "portfolio",
|
||||
children: [
|
||||
{
|
||||
label: "Projects",
|
||||
href: "/portfolio",
|
||||
href: getAdminAppPath("/portfolio"),
|
||||
icon: FolderKanban,
|
||||
active: portfolioChild === "overview" || portfolioChild === "projects",
|
||||
},
|
||||
{
|
||||
label: "Add Project",
|
||||
href: "/portfolio/projects/new",
|
||||
href: getAdminAppPath("/portfolio/projects/new"),
|
||||
icon: PlusSquare,
|
||||
active: portfolioChild === "new-project",
|
||||
},
|
||||
{
|
||||
label: "Add Category",
|
||||
href: "/portfolio/categories",
|
||||
href: getAdminAppPath("/portfolio/categories"),
|
||||
icon: Tags,
|
||||
active: portfolioChild === "categories",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user