2025-11-23 18:23:51 +01:00
|
|
|
import type { Metadata } from 'next';
|
|
|
|
|
import { Inter } from 'next/font/google';
|
|
|
|
|
import './globals.css';
|
|
|
|
|
import { Providers } from '@/components/providers/Providers';
|
2025-11-23 20:27:44 +01:00
|
|
|
import { AppLayout } from '@/components/layout/AppLayout';
|
2025-11-23 18:23:51 +01:00
|
|
|
|
|
|
|
|
const inter = Inter({
|
|
|
|
|
subsets: ['latin'],
|
|
|
|
|
variable: '--font-inter',
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export const metadata: Metadata = {
|
|
|
|
|
title: 'Supervisor UI',
|
|
|
|
|
description: 'Modern web interface for Supervisor process management',
|
|
|
|
|
};
|
|
|
|
|
|
2025-11-23 18:43:55 +01:00
|
|
|
// Force dynamic rendering
|
|
|
|
|
export const dynamic = 'force-dynamic';
|
|
|
|
|
|
2025-11-23 18:23:51 +01:00
|
|
|
export default function RootLayout({
|
|
|
|
|
children,
|
|
|
|
|
}: Readonly<{
|
|
|
|
|
children: React.ReactNode;
|
|
|
|
|
}>) {
|
|
|
|
|
return (
|
|
|
|
|
<html lang="en" suppressHydrationWarning>
|
|
|
|
|
<head>
|
|
|
|
|
<script
|
|
|
|
|
dangerouslySetInnerHTML={{
|
|
|
|
|
__html: `
|
|
|
|
|
(function() {
|
|
|
|
|
try {
|
|
|
|
|
const theme = localStorage.getItem('theme') || 'system';
|
|
|
|
|
const systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
|
|
|
const effectiveTheme = theme === 'system' ? systemTheme : theme;
|
|
|
|
|
if (effectiveTheme === 'dark') {
|
|
|
|
|
document.documentElement.classList.add('dark');
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {}
|
|
|
|
|
})();
|
|
|
|
|
`,
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</head>
|
|
|
|
|
<body className={`${inter.variable} antialiased`}>
|
|
|
|
|
<Providers>
|
2025-11-23 20:27:44 +01:00
|
|
|
<AppLayout>{children}</AppLayout>
|
2025-11-23 18:23:51 +01:00
|
|
|
</Providers>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
);
|
|
|
|
|
}
|