Oliver-ai-bot_2.0/frontend/components/layout/app-shell.tsx
Vadym Samoilenko 44a512c41f Phase 1 Complete: Dual-bot architecture, knowledge base, access control
- Remove notebook mode, add RAG + Personal Assistant dual-bot setup
- Add knowledge base management (upload, URL scraping, document processing)
- Add user feature access control (allowed_features, features_override)
- Update admin dashboard with knowledge base tab
- Redesign login page, sidebar, and profile
- Add Celery tasks for async document processing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 21:26:40 +00:00

50 lines
1.6 KiB
TypeScript

'use client';
import { usePathname } from 'next/navigation';
import { Sidebar } from './sidebar';
import { MobileSidebar } from './mobile-sidebar';
interface AppShellProps {
children: React.ReactNode;
}
export function AppShell({ children }: AppShellProps) {
const pathname = usePathname();
const noSidebarRoutes = ['/login', '/auth/callback'];
const shouldShowSidebar = !noSidebarRoutes.some((route) =>
pathname?.startsWith(route)
);
if (!shouldShowSidebar) {
return <>{children}</>;
}
return (
<div className="flex h-screen overflow-hidden bg-background">
{/* Desktop Sidebar */}
<aside className="hidden lg:block">
<Sidebar />
</aside>
{/* Main Content */}
<div className="flex flex-1 flex-col overflow-hidden">
{/* Mobile Header */}
<header className="flex h-14 items-center border-b bg-card px-4 lg:hidden">
<MobileSidebar />
<div className="ml-3 flex items-center gap-2">
<div className="flex h-8 w-8 items-center justify-center rounded-lg bg-gradient-to-br from-primary to-accent">
<svg className="h-4 w-4 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 10V3L4 14h7v7l9-11h-7z" />
</svg>
</div>
<span className="text-base font-bold text-foreground">Nexus</span>
</div>
</header>
{/* Page Content */}
<main className="flex-1 overflow-y-auto page-transition">{children}</main>
</div>
</div>
);
}