Spaces:
Paused
Paused
CBV01 commited on
Commit ·
de1901b
1
Parent(s): 52fa484
style: Force dark mode globally and redesign MonetizationOverlay as a fixed full-screen modal
Browse files
frontend/src/app/layout.tsx
CHANGED
|
@@ -25,13 +25,14 @@ export default function RootLayout({
|
|
| 25 |
children: React.ReactNode;
|
| 26 |
}>) {
|
| 27 |
return (
|
| 28 |
-
<html lang="en" suppressHydrationWarning>
|
| 29 |
<body
|
| 30 |
className={`${geistSans.variable} ${geistMono.variable} antialiased selection:bg-blue-500/30 font-sans min-h-screen bg-background text-foreground`}
|
| 31 |
>
|
| 32 |
<ThemeProvider
|
| 33 |
attribute="class"
|
| 34 |
defaultTheme="dark"
|
|
|
|
| 35 |
enableSystem={false}
|
| 36 |
disableTransitionOnChange
|
| 37 |
>
|
|
|
|
| 25 |
children: React.ReactNode;
|
| 26 |
}>) {
|
| 27 |
return (
|
| 28 |
+
<html lang="en" suppressHydrationWarning className="dark">
|
| 29 |
<body
|
| 30 |
className={`${geistSans.variable} ${geistMono.variable} antialiased selection:bg-blue-500/30 font-sans min-h-screen bg-background text-foreground`}
|
| 31 |
>
|
| 32 |
<ThemeProvider
|
| 33 |
attribute="class"
|
| 34 |
defaultTheme="dark"
|
| 35 |
+
forcedTheme="dark"
|
| 36 |
enableSystem={false}
|
| 37 |
disableTransitionOnChange
|
| 38 |
>
|
frontend/src/components/MonetizationOverlay.tsx
CHANGED
|
@@ -143,9 +143,9 @@ export const MonetizationOverlay: React.FC<MonetizationOverlayProps> = ({ childr
|
|
| 143 |
{children}
|
| 144 |
|
| 145 |
{isLocked && (
|
| 146 |
-
<div className="
|
| 147 |
{/* Dark Solid Backdrop for Mobile, Glass for Desktop */}
|
| 148 |
-
<div className="absolute inset-0 bg-background/95 lg:bg-background/
|
| 149 |
<div className="hidden lg:block absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[500px] h-[500px] bg-indigo-500/8 rounded-full blur-[120px] pointer-events-none" />
|
| 150 |
|
| 151 |
<div className="relative w-full max-w-[480px] my-4 animate-in zoom-in-95 duration-400">
|
|
|
|
| 143 |
{children}
|
| 144 |
|
| 145 |
{isLocked && (
|
| 146 |
+
<div className="fixed inset-0 z-[100] flex flex-col items-center justify-center p-4 h-[100dvh] w-screen overflow-hidden bg-background">
|
| 147 |
{/* Dark Solid Backdrop for Mobile, Glass for Desktop */}
|
| 148 |
+
<div className="absolute inset-0 bg-background/95 lg:bg-background/90 lg:backdrop-blur-3xl" />
|
| 149 |
<div className="hidden lg:block absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[500px] h-[500px] bg-indigo-500/8 rounded-full blur-[120px] pointer-events-none" />
|
| 150 |
|
| 151 |
<div className="relative w-full max-w-[480px] my-4 animate-in zoom-in-95 duration-400">
|
frontend/src/components/Sidebar.tsx
CHANGED
|
@@ -199,18 +199,6 @@ export function Sidebar({ children }: { children: React.ReactNode }) {
|
|
| 199 |
|
| 200 |
{/* Theme Toggle & Logout */}
|
| 201 |
<div className="p-4 border-t border-border space-y-1">
|
| 202 |
-
<button
|
| 203 |
-
onClick={() => setTheme(theme === "dark" ? "light" : "dark")}
|
| 204 |
-
className={`
|
| 205 |
-
flex items-center gap-3 py-3 w-full rounded-xl text-sm font-medium transition-all text-foreground/60 hover:text-foreground hover:bg-foreground/5
|
| 206 |
-
${isCollapsed ? "justify-center px-0" : "px-4"}
|
| 207 |
-
`}
|
| 208 |
-
title={isCollapsed ? "Toggle Theme" : ""}
|
| 209 |
-
>
|
| 210 |
-
{mounted && (theme === "dark" ? <Sun size={20} /> : <Moon size={20} />)}
|
| 211 |
-
{!isCollapsed && <span className="animate-in fade-in duration-300">{mounted ? (theme === "dark" ? "Light Mode" : "Dark Mode") : "Theme"}</span>}
|
| 212 |
-
</button>
|
| 213 |
-
|
| 214 |
<button
|
| 215 |
onClick={handleLogout}
|
| 216 |
className={`
|
|
|
|
| 199 |
|
| 200 |
{/* Theme Toggle & Logout */}
|
| 201 |
<div className="p-4 border-t border-border space-y-1">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
<button
|
| 203 |
onClick={handleLogout}
|
| 204 |
className={`
|