- RTL: force dir=rtl on LabelFilter, NotesViewToggle, LabelManagementDialog - i18n: add missing keys (notifications, privacy, edit/preview, AI translate/undo) - Settings pages: convert to Server Components (general, appearance) + loading skeleton - AI menu: add Translate option (10 languages) + Undo AI button in toolbar - Fix: saveInline uses REST API instead of Server Action → eliminates all implicit refreshes in list mode - Fix: NotesTabsView notes sync effect preserves selected note on content changes - Fix: auto-tag suggestions now filter already-assigned labels - Fix: color change in card view uses local state (no refresh) - Fix: nav links use <Link> for prefetching (Settings, Admin) - Fix: suppress duplicate label suggestions already on note - Route: add /api/ai/translate endpoint
35 lines
1.3 KiB
TypeScript
35 lines
1.3 KiB
TypeScript
import { HeaderWrapper } from "@/components/header-wrapper";
|
|
import { Sidebar } from "@/components/sidebar";
|
|
import { ProvidersWrapper } from "@/components/providers-wrapper";
|
|
import { auth } from "@/auth";
|
|
import { detectUserLanguage } from "@/lib/i18n/detect-user-language";
|
|
|
|
export default async function MainLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
const session = await auth();
|
|
const initialLanguage = await detectUserLanguage();
|
|
|
|
return (
|
|
<ProvidersWrapper initialLanguage={initialLanguage}>
|
|
<div className="bg-background-light dark:bg-background-dark font-display text-slate-900 dark:text-white overflow-hidden h-screen flex flex-col">
|
|
{/* Top Navigation - Style Keep */}
|
|
<HeaderWrapper user={session?.user} />
|
|
|
|
{/* Main Layout */}
|
|
<div className="flex flex-1 overflow-hidden">
|
|
{/* Sidebar Navigation - Style Keep */}
|
|
<Sidebar className="w-64 flex-none flex-col bg-white dark:bg-[#1e2128] border-r border-slate-200 dark:border-slate-800 overflow-y-auto hidden md:flex" user={session?.user} />
|
|
|
|
{/* Main Content Area */}
|
|
<main className="flex min-h-0 flex-1 flex-col overflow-y-auto bg-background-light dark:bg-background-dark p-4 scroll-smooth">
|
|
{children}
|
|
</main>
|
|
</div>
|
|
</div>
|
|
</ProvidersWrapper>
|
|
);
|
|
}
|