From a6de052952f7ec3ec68e32882ffc0588d69cc66d Mon Sep 17 00:00:00 2001 From: Dmitri Date: Tue, 14 Apr 2026 19:28:48 +0400 Subject: [PATCH] improvements for safari fades --- .../Constructor/CanvasBackground.tsx | 29 +--- .../components/PreviousBackgroundOverlay.tsx | 66 +++++++ .../src/components/RuntimePresentation.tsx | 161 +++--------------- frontend/src/css/main.css | 118 +++++++------ frontend/src/hooks/useBackgroundTransition.ts | 105 ++++-------- frontend/src/hooks/usePageSwitch.ts | 79 +++++++-- 6 files changed, 265 insertions(+), 293 deletions(-) create mode 100644 frontend/src/components/PreviousBackgroundOverlay.tsx diff --git a/frontend/src/components/Constructor/CanvasBackground.tsx b/frontend/src/components/Constructor/CanvasBackground.tsx index d223d44..7395324 100644 --- a/frontend/src/components/Constructor/CanvasBackground.tsx +++ b/frontend/src/components/Constructor/CanvasBackground.tsx @@ -9,6 +9,7 @@ import React from 'react'; import NextImage from 'next/image'; import { useBackgroundVideoPlayback } from '../../hooks/useBackgroundVideoPlayback'; +import PreviousBackgroundOverlay from '../PreviousBackgroundOverlay'; interface CanvasBackgroundProps { backgroundImageUrl?: string; @@ -101,27 +102,13 @@ const CanvasBackground: React.FC = ({ {/* Previous background overlays - show during loading AND crossfade. Uses CSS animation for fade-out effect during crossfade. z-0 keeps them BELOW new backgrounds (z-1). */} - {previousBgImageUrl && (isFadingIn || (isSwitching && !isNewBgReady)) && ( -
- )} - {previousBgVideoUrl && (isFadingIn || (isSwitching && !isNewBgReady)) && ( -