diff --git a/CHANGELOG.md b/CHANGELOG.md index 367de7ed..2eab74d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +1.0.10 _ 2025-10-05 _ utm +1.0.9 _ 2025-10-05 _ utm 1.0.8 _ 2025-10-05 _ замена инпут на текстареа 1.0.7 _ 2025-10-05 _ замена инпут на текстареа 1.0.6 _ 2025-09-19 _ логика включения таймера diff --git a/src/pages/startPage/StartPageSettings/StartPageSettings.tsx b/src/pages/startPage/StartPageSettings/StartPageSettings.tsx index 6f92a4f4..eb23982c 100755 --- a/src/pages/startPage/StartPageSettings/StartPageSettings.tsx +++ b/src/pages/startPage/StartPageSettings/StartPageSettings.tsx @@ -82,9 +82,8 @@ export default function StartPageSettings() { if (!quiz) return; console.log("[StartPage] Video upload start", { videoUrl }); - setBackgroundUploading(true); - if (videoUrl.startsWith("blob:")) { + setBackgroundUploading(true); const videoBlob = await (await fetch(videoUrl)).blob(); console.log("[StartPage] Uploading blob to backend", { size: videoBlob.size, type: videoBlob.type }); uploadQuizImage(quiz.id, videoBlob, (quiz, url) => { @@ -92,6 +91,8 @@ export default function StartPageSettings() { console.log("[StartPage] Backend returned video URL", { url }); }); } else { + // для ссылок скелетон не нужен + setBackgroundUploading(false); updateQuiz(quiz.id, (quiz) => { quiz.config.startpage.background.video = videoUrl; }); @@ -481,6 +482,7 @@ export default function StartPageSettings() { console.log('[StartPage] VideoElement reported loaded'); setBackgroundUploading(false); }} + showSkeleton={backgroundUploding} onDeleteClick={() => { updateQuiz(quiz.id, (quiz) => { quiz.config.startpage.background.video = null; diff --git a/src/pages/startPage/VideoElement.tsx b/src/pages/startPage/VideoElement.tsx index 508aac12..0908ea10 100644 --- a/src/pages/startPage/VideoElement.tsx +++ b/src/pages/startPage/VideoElement.tsx @@ -12,6 +12,7 @@ type VideoElementProps = { onDeleteClick: () => void; deleteIconSx?: SxProps; onLoaded?: () => void; + showSkeleton?: boolean; }; export const VideoElement: FC = ({ @@ -21,6 +22,7 @@ export const VideoElement: FC = ({ onDeleteClick, deleteIconSx, onLoaded, + showSkeleton = true, }) => { const containerRef = useRef(null); const [isLoaded, setIsLoaded] = useState(false); @@ -69,7 +71,7 @@ export const VideoElement: FC = ({ return ( - {!isLoaded && ( + {!isLoaded && showSkeleton && (