From b270ef438d8978f13c7c1772cf0747b245c55ba6 Mon Sep 17 00:00:00 2001 From: "soroush.asadi" Date: Wed, 3 Jun 2026 08:20:46 +0330 Subject: [PATCH] fix(admin): sidebar invisible (CSS specificity) + /admin lands on dashboard - AdminShell: the rtl:/ltr: translate variants ([dir] selector) out-specified lg:translate-x-0, so the sidebar stayed off-screen on desktop and the mobile drawer couldn't open. Pin physically right + plain translate-x-full/0; content uses lg:mr-60. - /admin now redirects to /admin/stats (overview) instead of /admin/nodes. Co-Authored-By: Claude Opus 4.8 --- src/app/[locale]/admin/page.tsx | 3 ++- src/components/admin/AdminShell.tsx | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/app/[locale]/admin/page.tsx b/src/app/[locale]/admin/page.tsx index edb4649..aafccf5 100644 --- a/src/app/[locale]/admin/page.tsx +++ b/src/app/[locale]/admin/page.tsx @@ -1,5 +1,6 @@ import { redirect } from "next/navigation"; export default function AdminRootPage() { - redirect("/admin/nodes"); + // Land on the dashboard overview, not an arbitrary section. + redirect("/admin/stats"); } diff --git a/src/components/admin/AdminShell.tsx b/src/components/admin/AdminShell.tsx index 95ef663..dc29dfb 100644 --- a/src/components/admin/AdminShell.tsx +++ b/src/components/admin/AdminShell.tsx @@ -28,10 +28,13 @@ export function AdminShell({ return (
- {/* Sidebar */} + {/* Sidebar — pinned to the right (admin is RTL-primary). lg:translate-x-0 + keeps it visible on desktop; on mobile it slides off the right edge. + (Avoid rtl:/ltr: translate variants — their [dir] selector out-specifies + lg: and would keep the panel off-screen.) */}