From 050292a2826ef77bce0553934738b99df55d5383 Mon Sep 17 00:00:00 2001 From: yiekheng Date: Sun, 10 May 2026 18:14:03 +0800 Subject: [PATCH] =?UTF-8?q?feat(web):=20bare=20login=20header=20=E2=80=94?= =?UTF-8?q?=20only=20centred=20brand=20mark?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The login page lived inside the authenticated AppShell, so the desktop sidebar (with all nav items) and the mobile menu drawer were rendering on the sign-in screen. AppShell now branches on pathname=/login and renders a single centred header (cm + WhatsApp Bot) with no nav, plus the form. Drops the redundant in-card title since the header carries the brand. Co-Authored-By: Claude Opus 4.7 (1M context) --- apps/web/src/app/login/page.tsx | 9 +++---- apps/web/src/components/app-shell.tsx | 36 +++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/apps/web/src/app/login/page.tsx b/apps/web/src/app/login/page.tsx index 2d29e57..bee1ad0 100644 --- a/apps/web/src/app/login/page.tsx +++ b/apps/web/src/app/login/page.tsx @@ -1,4 +1,4 @@ -import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import { Card, CardContent } from "@/components/ui/card"; import { LoginFormClient } from "./login-form-client"; export const metadata = { @@ -14,12 +14,9 @@ export default async function LoginPage({ searchParams }: PageProps) { const next = sp.next ?? "/"; return ( -
+
- - Sign in - - + diff --git a/apps/web/src/components/app-shell.tsx b/apps/web/src/components/app-shell.tsx index 945b410..dcea32f 100644 --- a/apps/web/src/components/app-shell.tsx +++ b/apps/web/src/components/app-shell.tsx @@ -180,6 +180,30 @@ function Sidebar() { ); } +// --------------------------------------------------------------------------- +// Bare header for unauthenticated routes (/login). No sidebar, no mobile +// menu, no nav — just the centered brand mark + name. The user explicitly +// asked for nothing else here so the sign-in screen feels like a separate +// surface from the authenticated app. +// --------------------------------------------------------------------------- +function BareHeader() { + return ( +
+
+ + cm + + + WhatsApp Bot + +
+
+ ); +} + // --------------------------------------------------------------------------- // AppShell — the outer container // --------------------------------------------------------------------------- @@ -188,6 +212,18 @@ interface AppShellProps { } export function AppShell({ children }: AppShellProps) { + const pathname = usePathname(); + const isAuthRoute = pathname === "/login"; + + if (isAuthRoute) { + return ( + <> + +
{children}
+ + ); + } + return ( <> {/* Desktop sidebar */}