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

@ -39,13 +39,12 @@ export const FullScreenLoader = ({
{fullScreen && (
<Fade in timeout={220} appear>
<Box
className="glass-ui"
sx={{
position: 'absolute',
inset: 0,
background:
'radial-gradient(circle at 15% 20%, rgba(242,113,33,0.15), transparent 60%), radial-gradient(circle at 85% 10%, rgba(233,64,205,0.12), transparent 55%), rgba(5,5,10,0.75)',
backdropFilter: 'blur(14px)',
WebkitBackdropFilter: 'blur(14px)',
}}
/>
</Fade>
@ -61,7 +60,9 @@ export const FullScreenLoader = ({
alignItems: 'center',
gap: 3,
// небольшой "подъём" при появлении
animation: 'popIn 260ms ease-out both',
animation: document.body.classList.contains('reduce-motion')
? 'none'
: 'popIn 260ms ease-out both',
'@keyframes popIn': {
from: { opacity: 0, transform: 'translateY(8px) scale(0.98)' },
to: { opacity: 1, transform: 'translateY(0) scale(1)' },
@ -76,7 +77,9 @@ export const FullScreenLoader = ({
position: 'relative',
overflow: 'hidden',
background: 'conic-gradient(#F27121, #E940CD, #8A2387, #F27121)',
animation: 'spin 1s linear infinite',
animation: document.body.classList.contains('reduce-motion')
? 'none'
: 'spin 1s linear infinite',
WebkitMask: 'radial-gradient(circle, transparent 55%, black 56%)',
mask: 'radial-gradient(circle, transparent 55%, black 56%)',
'@keyframes spin': {

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)',