Add dedicated local admin domain routing

This commit is contained in:
MOH
2026-03-13 17:48:45 +01:00
parent bfd7adccac
commit fef44ded80
47 changed files with 260 additions and 107 deletions
+7 -7
View File
@@ -19,7 +19,7 @@ import { SidebarMaintenanceControl } from "@/components/admin/sidebar-maintenanc
import { SoundToggle } from "@/components/sound-toggle";
import { ThemeToggle } from "@/components/theme-toggle";
import { Button } from "@/components/ui/button";
import { buildSiteUrl } from "@/lib/admin-routing";
import { buildSiteUrl, getAdminAppPath } from "@/lib/admin-routing";
import { getMaintenanceMode, getSiteSettingsMediaBindings } from "@/lib/app-config";
import { getAdminNavigation } from "@/lib/admin-navigation";
@@ -75,12 +75,12 @@ export async function AdminDashboardShell({
const sidebarItems = getAdminNavigation(copy, active, smtpChild, portfolioChild);
const normalizedSidebarItems = sidebarItems.filter(
(item) =>
item.href !== "/maintenance" &&
item.href !== "/ui-kit" &&
item.href !== "/smtp" &&
item.href !== "/marquee",
item.href !== getAdminAppPath("/maintenance") &&
item.href !== getAdminAppPath("/ui-kit") &&
item.href !== getAdminAppPath("/smtp") &&
item.href !== getAdminAppPath("/marquee"),
);
const footerSidebarItems = ["/marquee", "/smtp"]
const footerSidebarItems = [getAdminAppPath("/marquee"), getAdminAppPath("/smtp")]
.map((href) => sidebarItems.find((item) => item.href === href))
.filter((item): item is NonNullable<typeof item> => Boolean(item));
const headerIcon =
@@ -126,7 +126,7 @@ export async function AdminDashboardShell({
variant={active === "ui-kit" ? "default" : "outline"}
className="w-full justify-between"
>
<Link href="/ui-kit">
<Link href={getAdminAppPath("/ui-kit")}>
{copy.uiKit}
<SwatchBook className="h-4 w-4" />
</Link>