diff --git a/src/pages/ProCanvas.jsx b/src/pages/ProCanvas.jsx index fae1a1e..498c91f 100644 --- a/src/pages/ProCanvas.jsx +++ b/src/pages/ProCanvas.jsx @@ -5,6 +5,7 @@ import { useAuth } from '../context/AuthContext'; import { useMockStore } from '../data/mockStore'; import { GamificationProvider, useGamification } from '../context/GamificationContext'; import { useGamification as useOldGamification } from '../hooks/useGamification'; +import { useTheme } from '../context/ThemeContext'; import FloatingXPManager from '../components/ProCanvas/gamification/FloatingXPManager'; import LevelUpModal from '../components/ProCanvas/gamification/LevelUpModal'; import profilePic from '../assets/images/Profile_Pic_1_Agent.png'; @@ -104,14 +105,23 @@ const HexLevelBadge = ({ level, color = C.gold, size = 100, mobileSize = 85 }) = // Fut-style Player Card const OperatorCard = ({ user, gamestate }) => { + const { theme } = useTheme(); + const isDark = theme === 'dark'; return ( {/* Card Background (Elite Gold Theme) */} -
+
{/* Glossy overlay */}
@@ -194,33 +204,52 @@ const OperatorCard = ({ user, gamestate }) => { }; // Sleek Glass Panel (base container for UI) -const GlassPanel = ({ children, className = '', accentColor = 'transparent', title, icon: Icon, extra }) => ( -
+function GlassPanel({ children, className = '', accentColor = 'transparent', title, icon: Icon, extra }) { + const { theme } = useTheme(); + const isDark = theme === 'dark'; + const hasAccent = accentColor !== 'transparent'; - {/* Subtle accent glow at the top */} - {accentColor !== 'transparent' && ( -
- )} + return ( +
- {/* Header if provided */} - {(title || Icon || extra) && ( -
-
- {Icon && } -

- {title} -

-
- {extra &&
{extra}
} + {/* Dark mode: subtle accent glow line at top */} + {isDark && hasAccent && ( +
+ )} + + {/* Header */} + {(title || Icon || extra) && ( + isDark ? ( +
+
+ {Icon && } +

{title}

+
+ {extra &&
{extra}
} +
+ ) : ( +
+
+ {Icon && } +

{title}

+
+ {extra &&
{extra}
} +
+ ) + )} + +
+ {children}
- )} - -
- {children}
-
-); + ); +} // Progress Bar (Sleek, bright energy bar) const EnergyBar = ({ current, max, color = C.neon, label }) => { @@ -229,11 +258,11 @@ const EnergyBar = ({ current, max, color = C.neon, label }) => {
{label && (
- {label} - / {max} + {label} + / {max}
)} -
+
{ {actionKey === 'knock' && ( <>
- - + +
- - + +
- - + +
- - setXpReward(e.target.value === 'Pitched' ? 15 : 10)} className="w-full bg-zinc-100 dark:bg-black/50 border border-zinc-300 dark:border-white/10 rounded-lg p-3 text-zinc-900 dark:text-white focus:outline-none focus:border-[#AAFF00] transition-colors">
- +