Add admin site settings sections and locale defaults

This commit is contained in:
MOH
2026-03-15 04:06:33 +01:00
parent 3e9edc5873
commit 5d3f77962a
21 changed files with 993 additions and 456 deletions
+9 -1
View File
@@ -7,8 +7,10 @@ import { QueryToastBridge } from "@/components/admin/query-toast-bridge";
import { SoundProvider } from "@/components/sound-provider";
import { ThemeProvider } from "@/components/theme-provider";
import { Toaster } from "@/components/ui/toaster";
import { getSiteSettings } from "@/lib/app-config";
import { buildAppMetadata } from "@/lib/metadata";
import { getDirection } from "@/lib/locale";
import { buildSiteThemeStyleText } from "@/lib/site-theme";
import "./globals.css";
const museo = localFont({
@@ -82,10 +84,16 @@ export default async function RootLayout({
}>) {
noStore();
const locale = await getLocale().catch(() => "de");
const [locale, siteSettings] = await Promise.all([
getLocale().catch(() => "de"),
getSiteSettings(),
]);
return (
<html lang={locale} dir={getDirection(locale)} suppressHydrationWarning>
<head>
<style id="dynamic-site-theme">{buildSiteThemeStyleText(siteSettings.brand.primaryColor)}</style>
</head>
<body className={`${museo.variable} ${dubai.variable}`}>
<ThemeProvider>
<SoundProvider>