fix возможность добавить видео к вопросам
This commit is contained in:
parent
32e153518c
commit
99e394390c
@ -19,9 +19,9 @@ import UploadBox from "@ui_kit/UploadBox";
|
|||||||
import UploadIcon from "@icons/UploadIcon";
|
import UploadIcon from "@icons/UploadIcon";
|
||||||
import InfoIcon from "@icons/InfoIcon";
|
import InfoIcon from "@icons/InfoIcon";
|
||||||
|
|
||||||
import imge from "@/assets/card-1.png"
|
|
||||||
import { CropModalInit } from "./Modal/CropModal";
|
import { CropModalInit } from "./Modal/CropModal";
|
||||||
import { AnyTypedQuizQuestion } from "@frontend/squzanswerer";
|
import { AnyTypedQuizQuestion } from "@frontend/squzanswerer";
|
||||||
|
import UploadVideoModal from "@/pages/Questions/UploadVideoModal";
|
||||||
|
|
||||||
interface Iprops {
|
interface Iprops {
|
||||||
question: AnyTypedQuizQuestion;
|
question: AnyTypedQuizQuestion;
|
||||||
@ -35,11 +35,12 @@ export const MediaSelectionAndDisplay: FC<Iprops> = ({
|
|||||||
question,
|
question,
|
||||||
cropAspectRatio,
|
cropAspectRatio,
|
||||||
}) => {
|
}) => {
|
||||||
|
const theme = useTheme();
|
||||||
|
const [isVideoUploadDialogOpen, setIsVideoUploadDialogOpen] = useState<boolean>(false);
|
||||||
const [pictureUploding, setPictureUploading] = useState<boolean>(false);
|
const [pictureUploding, setPictureUploading] = useState<boolean>(false);
|
||||||
const [backgroundUploding, setBackgroundUploading] = useState<boolean>(false);
|
const [backgroundUploding, setBackgroundUploading] = useState<boolean>(false);
|
||||||
const [openCropModal, setOpenCropModal] = useState(false);
|
const [openCropModal, setOpenCropModal] = useState(false);
|
||||||
const quizQid = useCurrentQuiz()?.qid;
|
const quizQid = useCurrentQuiz()?.qid;
|
||||||
const theme = useTheme();
|
|
||||||
const [isImageUploadOpen, openImageUploadModal, closeImageUploadModal] =
|
const [isImageUploadOpen, openImageUploadModal, closeImageUploadModal] =
|
||||||
useDisclosure();
|
useDisclosure();
|
||||||
async function handleImageUpload(file: File) {
|
async function handleImageUpload(file: File) {
|
||||||
@ -151,6 +152,13 @@ export const MediaSelectionAndDisplay: FC<Iprops> = ({
|
|||||||
onClose={closeImageUploadModal}
|
onClose={closeImageUploadModal}
|
||||||
handleImageChange={handleImageUpload}
|
handleImageChange={handleImageUpload}
|
||||||
/>
|
/>
|
||||||
|
<UploadVideoModal
|
||||||
|
open={isVideoUploadDialogOpen}
|
||||||
|
onClose={() => setIsVideoUploadDialogOpen(false)}
|
||||||
|
onUpload={handleVideoUpload}
|
||||||
|
video={question.content.video}
|
||||||
|
/>
|
||||||
|
|
||||||
<CropModalInit
|
<CropModalInit
|
||||||
originalImageUrl={question.content.originalBack}
|
originalImageUrl={question.content.originalBack}
|
||||||
editedUrlImagesList={question.content?.editedUrlImagesList}
|
editedUrlImagesList={question.content?.editedUrlImagesList}
|
||||||
|
Loading…
Reference in New Issue
Block a user