@@ -27,10 +27,10 @@ export function AppSidebar({
|
||||
items,
|
||||
footer,
|
||||
}: AppSidebarProps) {
|
||||
const portfolioItem = items.find((item) => item.href === "/root/portfolio");
|
||||
const systemOrder = ["/root", "/root/media", "/root/maintenance", "/root/ui-kit"];
|
||||
const portfolioItem = items.find((item) => item.href === "/portfolio");
|
||||
const systemOrder = ["/", "/media", "/maintenance", "/ui-kit"];
|
||||
const systemItems = items
|
||||
.filter((item) => item.href !== "/root/portfolio")
|
||||
.filter((item) => item.href !== "/portfolio")
|
||||
.sort((left, right) => systemOrder.indexOf(left.href) - systemOrder.indexOf(right.href));
|
||||
|
||||
function renderItem(item: SidebarItem, nested = false) {
|
||||
|
||||
@@ -2,6 +2,7 @@ import Link from "next/link";
|
||||
import { useLocale, useTranslations } from "next-intl";
|
||||
|
||||
import { Container } from "@/components/layout/container";
|
||||
import { buildAdminUrl } from "@/lib/admin-routing";
|
||||
import { getLocalizedPath } from "@/lib/locale";
|
||||
|
||||
const navItems = [
|
||||
@@ -34,7 +35,7 @@ export function SiteFooter({ isAdmin = false }: SiteFooterProps) {
|
||||
</Link>
|
||||
))}
|
||||
{isAdmin ? (
|
||||
<a href="/root" className="text-muted-foreground hover:text-foreground">
|
||||
<a href={buildAdminUrl()} className="text-muted-foreground hover:text-foreground">
|
||||
{tNav("root")}
|
||||
</a>
|
||||
) : null}
|
||||
|
||||
@@ -13,6 +13,7 @@ import { SiteLogo } from "@/components/layout/site-logo";
|
||||
import { SoundToggle } from "@/components/sound-toggle";
|
||||
import { ThemeToggle } from "@/components/theme-toggle";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { buildAdminUrl } from "@/lib/admin-routing";
|
||||
import { getLocalizedPath, stripLocalePrefix } from "@/lib/locale";
|
||||
import { toast } from "@/lib/toast";
|
||||
import { cn } from "@/lib/utils";
|
||||
@@ -314,7 +315,7 @@ export function SiteHeader({
|
||||
/>
|
||||
{isAdmin ? (
|
||||
<Button asChild variant="ghost" size="icon" className={desktopControlButtonClassName}>
|
||||
<Link href="/root" aria-label={t("root")}>
|
||||
<Link href={buildAdminUrl()} aria-label={t("root")}>
|
||||
<LayoutDashboard className="h-4 w-4 transition-transform duration-300 ease-out hover:scale-110" />
|
||||
</Link>
|
||||
</Button>
|
||||
@@ -464,7 +465,7 @@ export function SiteHeader({
|
||||
/>
|
||||
{isAdmin ? (
|
||||
<Button asChild variant="ghost" size="icon" className={mobileControlButtonClassName}>
|
||||
<Link href="/root" aria-label={t("root")} onClick={() => setIsOpen(false)}>
|
||||
<Link href={buildAdminUrl()} aria-label={t("root")} onClick={() => setIsOpen(false)}>
|
||||
<LayoutDashboard className="h-4 w-4 transition-transform duration-300 ease-out hover:scale-110" />
|
||||
</Link>
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user