diff --git a/src/pages/startPage/StartPageSettings.tsx b/src/pages/startPage/StartPageSettings.tsx index 3af679b8..8d7ddfe1 100755 --- a/src/pages/startPage/StartPageSettings.tsx +++ b/src/pages/startPage/StartPageSettings.tsx @@ -20,9 +20,9 @@ import { FormControlLabel, MenuItem, Select, + Skeleton, Tooltip, Typography, - Skeleton, useMediaQuery, useTheme, } from "@mui/material"; @@ -45,6 +45,7 @@ import SelectableIconButton from "./SelectableIconButton"; import { DropZone } from "./dropZone"; import Extra from "./extra"; import TooltipClickInfo from "@ui_kit/Toolbars/TooltipClickInfo"; +import { VideoElement } from "./VideoElement"; const designTypes = [ [ @@ -386,91 +387,103 @@ export default function StartPageSettings() { {quiz.config.startpage.background.type === "video" && ( <> - - - Добавить видео - - {isMobile ? ( - - ) : ( - - - - - - )} - - {backgroundUploding ? ( - - ) : ( + {!quiz.config.startpage.background.video ? ( <> - - { - setBackgroundUploading(true); - const file = event.target.files?.[0]; - - if (file) { - await uploadQuizImage( - quiz.id, - file, - (quiz, url) => { - quiz.config.startpage.background.video = url; - }, - ); - // setVideo(URL.createObjectURL(file)); - } - - setBackgroundUploading(false); - }} - hidden - accept=".mp4" - multiple - type="file" - /> - } + + Добавить видео + + {isMobile ? ( + + ) : ( + + + + + + )} + + {backgroundUploding ? ( + - - {quiz.config.startpage.background.video && ( -