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>
@@ -8,6 +8,7 @@ import { AppCard } from "@/components/ui/app-card";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { CardContent } from "@/components/ui/card";
import { getAdminAppPath } from "@/lib/admin-routing";
import { getLocalizedPath } from "@/lib/locale";
import { getLocalizedValue, type PortfolioCategoryView, type PortfolioProjectView } from "@/lib/portfolio";
@@ -46,13 +47,13 @@ export function PortfolioProjectsOverview({
<div className="flex flex-wrap gap-2">
<Button asChild>
<Link href="/portfolio/projects/new">
<Link href={getAdminAppPath("/portfolio/projects/new")}>
<Plus className="h-4 w-4" />
{copy.newProject}
</Link>
</Button>
<Button asChild variant="outline">
<Link href="/portfolio/categories">
<Link href={getAdminAppPath("/portfolio/categories")}>
<Tags className="h-4 w-4" />
{copy.newCategory}
</Link>
@@ -62,7 +63,7 @@ export function PortfolioProjectsOverview({
<div className="flex flex-wrap gap-2">
<Button asChild variant={selectedCategory === "" ? "default" : "outline"}>
<Link href="/portfolio">{copy.all}</Link>
<Link href={getAdminAppPath("/portfolio")}>{copy.all}</Link>
</Button>
{categories.map((category) => (
<Button
@@ -70,7 +71,7 @@ export function PortfolioProjectsOverview({
asChild
variant={selectedCategory === category.id ? "default" : "outline"}
>
<Link href={`/portfolio?category=${category.id}`}>
<Link href={`${getAdminAppPath("/portfolio")}?category=${category.id}`}>
{category.name.de || category.name.en || category.name.ar}
</Link>
</Button>