new function settings

This commit is contained in:
aurinex
2025-12-15 00:37:45 +05:00
parent 645de4248e
commit 11a203cb8f
8 changed files with 232 additions and 153 deletions

View File

@ -266,8 +266,18 @@ export default function TopBar({ onRegister, username }: TopBarProps) {
return () => window.removeEventListener('skin-updated', handler as EventListener);
}, [loadSkin]);
useEffect(() => {
const handler = () => {
requestAnimationFrame(updateGradientVars);
};
window.addEventListener('settings-updated', handler as EventListener);
return () => window.removeEventListener('settings-updated', handler as EventListener);
}, [updateGradientVars]);
return (
<Box
className={isAuthPage ? undefined : 'glass-ui'}
sx={{
display: 'flex',
position: 'fixed',
@ -287,7 +297,6 @@ export default function TopBar({ onRegister, username }: TopBarProps) {
// стиль как в Registration
background: isAuthPage ?
'none' : 'linear-gradient(71deg, rgba(242,113,33,0.18) 0%, rgba(233,64,205,0.14) 70%, rgba(138,35,135,0.16) 100%)',
backdropFilter: isAuthPage ? 'none' : 'blur(10px)',
boxShadow: isAuthPage ? 'none' : '0 8px 30px rgba(0,0,0,0.35)',
}}
>
@ -316,6 +325,7 @@ export default function TopBar({ onRegister, username }: TopBarProps) {
transition: 'transform 0.3s ease',
'&:hover': {
transform: 'scale(1.2)',
...(document.body.classList.contains('reduce-motion') ? { transform: 'none' } : null),
},
}}
>
@ -693,6 +703,7 @@ export default function TopBar({ onRegister, username }: TopBarProps) {
background:
'linear-gradient(71deg, #F27121 0%, #E940CD 70%, #8A2387 100%)',
transform: 'scale(1.01)',
...(document.body.classList.contains('reduce-motion') ? { transform: 'none' } : null),
boxShadow: '0 4px 15px rgba(242, 113, 33, 0.4)',
},
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.3)',