From c656d316183a3b75349379a60a713becbf7bb25a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Thu, 18 Apr 2024 19:11:50 -0500 Subject: [PATCH] feat: a few settings --- src/app/layout.tsx | 30 ++++++++---- src/app/settings/page.tsx | 48 +++++++++++++++++++ src/app/tools/layout.tsx | 13 +---- .../Model/components/ModelLoader.tsx | 2 +- src/{app/tools => }/components/Loader.tsx | 2 +- src/components/PageWrapper.tsx | 6 ++- src/stores/app.ts | 4 ++ 7 files changed, 82 insertions(+), 23 deletions(-) create mode 100644 src/app/settings/page.tsx rename src/{app/tools => }/components/Loader.tsx (94%) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 81b56377d..51ad5b5be 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -5,9 +5,10 @@ import '@radix-ui/themes/styles.css'; import { config } from 'dotenv'; import { Roboto_Flex } from 'next/font/google'; import { usePathname } from 'next/navigation'; -import { ReactNode, useEffect, useState } from 'react'; +import { ReactNode, Suspense, useEffect, useState } from 'react'; import { Footer } from '../components/Footer'; import { Google } from '../components/Google'; +import { Loader } from '../components/Loader'; import Navbar from '../components/Navbar'; import isDev from '../core/blitzkrieg/isDev'; import { isLocalhost } from '../core/blitzkrieg/isLocalhost'; @@ -31,6 +32,7 @@ export default function RootLayout({ children }: RootLayoutProps) { const pathname = usePathname(); const isEmbed = pathname.split('/')[1] === 'embeds'; const isRoot = pathname === '/'; + const darkMode = useApp((state) => state.darkMode); const [showDevBuildAlert, setShowDevBuildAlert] = useState(false); const isFullScreen = useFullScreen(); @@ -46,11 +48,15 @@ export default function RootLayout({ children }: RootLayoutProps) { return ( - {isRoot && Blitzkrieg} - + {isRoot && ( + <> + Blitzkrieg + + + )} @@ -64,7 +70,7 @@ export default function RootLayout({ children }: RootLayoutProps) { }} > - {children} + + + + } + > + {children} + {!isEmbed && !isFullScreen &&