- Split composer into AI zone (primary accent) and data actions zone (neutral) - Move Attach/Generate to labeled footer bar below textarea (left/right aligned) - Add info icon with HoverCard (hover preview) + Popover (pinned click) showing identical keyboard shortcuts content using shadcn HoverCard to fix theme inconsistency vs Tooltip - Expose imperative triggerRef on ImagePicker for keyboard shortcut access - Wire TooltipProvider in root layout; install shadcn kbd and hover-card - Unauthenticated state shows locked CTA with real sign-in button weight - Add behavioral contract tests for footer bar, info trigger, and zone layout
78 lines
2.0 KiB
TypeScript
78 lines
2.0 KiB
TypeScript
import type { Metadata } from "next";
|
|
import { Geist, Geist_Mono } from "next/font/google";
|
|
import "./globals.css";
|
|
import { CalendarDays } from "lucide-react";
|
|
import Link from "next/link";
|
|
import { ThemeProvider } from "next-themes";
|
|
import { ModeToggle } from "@/components/mode-toggle";
|
|
import SignIn from "@/components/sign-in";
|
|
import { Toaster } from "@/components/ui/sonner";
|
|
import { TooltipProvider } from "@/components/ui/tooltip";
|
|
|
|
const geistSans = Geist({
|
|
subsets: ["latin", "cyrillic"],
|
|
variable: "--font-geist-sans",
|
|
});
|
|
|
|
const geistMono = Geist_Mono({
|
|
subsets: ["latin"],
|
|
variable: "--font-geist-mono",
|
|
});
|
|
|
|
export const metadata: Metadata = {
|
|
title: "Local iCal",
|
|
description: "Local iCal editor for calendar events",
|
|
creator: "Dmytro Stanchiev",
|
|
};
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
return (
|
|
<html lang="en" suppressHydrationWarning>
|
|
<body
|
|
className={`${geistSans.variable} ${geistMono.variable} font-sans antialiased min-h-screen flex flex-col`}
|
|
>
|
|
<ThemeProvider
|
|
attribute="class"
|
|
defaultTheme="dark"
|
|
enableSystem
|
|
disableTransitionOnChange
|
|
>
|
|
<TooltipProvider delayDuration={300}>
|
|
<header className="sticky top-0 z-50 glass-strong">
|
|
<div className="max-w-4xl mx-auto flex items-center justify-between px-4 sm:px-6 h-14">
|
|
<Link
|
|
href="/"
|
|
className="flex items-center gap-2.5 font-semibold text-foreground tracking-tight"
|
|
>
|
|
<CalendarDays className="h-5 w-5 text-primary" />
|
|
<span>{(metadata.title as string) || "iCal PWA"}</span>
|
|
</Link>
|
|
<div className="flex items-center gap-2">
|
|
<SignIn />
|
|
<ModeToggle />
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<main className="flex-1">
|
|
<div className="max-w-4xl mx-auto px-4 sm:px-6 py-6">
|
|
{children}
|
|
</div>
|
|
</main>
|
|
<Toaster
|
|
closeButton
|
|
richColors
|
|
toastOptions={{
|
|
className: "glass-strong",
|
|
}}
|
|
/>
|
|
</TooltipProvider>
|
|
</ThemeProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|