layout.tsx 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import type { Metadata } from "next";
  2. import { Inter } from "next/font/google";
  3. import "./globals.css";
  4. import { ThemeProvider } from "@/components/theme-provider";
  5. import { VersionChecker } from "@/components/version-checker";
  6. const inter = Inter({
  7. subsets: ["latin"],
  8. variable: "--font-sans",
  9. });
  10. export const metadata: Metadata = {
  11. title: "Stable Diffusion REST - Web UI",
  12. description: "Modern web interface for Stable Diffusion image generation",
  13. };
  14. export default function RootLayout({
  15. children,
  16. }: Readonly<{
  17. children: React.ReactNode;
  18. }>) {
  19. return (
  20. <html lang="en" suppressHydrationWarning>
  21. <head>
  22. {/* Load server configuration - this is dynamically generated by the server */}
  23. {/* Load synchronously to ensure config is available before React hydration */}
  24. <script src="/ui/config.js"></script>
  25. </head>
  26. <body className={`${inter.variable} font-sans antialiased`}>
  27. <ThemeProvider
  28. attribute="class"
  29. defaultTheme="system"
  30. enableSystem
  31. disableTransitionOnChange
  32. >
  33. <VersionChecker />
  34. {children}
  35. </ThemeProvider>
  36. </body>
  37. </html>
  38. );
  39. }