diff --git a/src/pages/Questions/BranchingPanel/index.tsx b/src/pages/Questions/BranchingPanel/index.tsx index 7e893b1e..3c60e56b 100644 --- a/src/pages/Questions/BranchingPanel/index.tsx +++ b/src/pages/Questions/BranchingPanel/index.tsx @@ -26,7 +26,7 @@ export const BranchingPanel = (sx?: SxProps) => { }} > { updateOpenBranchingPanel(value) }} diff --git a/src/pages/Questions/QuestionSwitchWindowTool.tsx b/src/pages/Questions/QuestionSwitchWindowTool.tsx index f7531dbb..aa2943b4 100644 --- a/src/pages/Questions/QuestionSwitchWindowTool.tsx +++ b/src/pages/Questions/QuestionSwitchWindowTool.tsx @@ -1,7 +1,7 @@ import { - Box, - } from "@mui/material"; + Box, useMediaQuery, useTheme, +} from "@mui/material"; import { DraggableList } from "./DraggableList"; import { SwitchBranchingPanel } from "./SwitchBranchingPanel"; import { BranchingMap } from "./BranchingMap"; @@ -10,9 +10,11 @@ import {useQuestionsStore} from "@root/questions/store"; export const QuestionSwitchWindowTool = () => { const {openBranchingPanel, questions} = useQuestionsStore.getState() + const theme = useTheme(); + const isMobile = useMediaQuery(theme.breakpoints.down(600)); console.log("questions ", questions) return ( - + {openBranchingPanel? : } diff --git a/src/pages/Questions/SwitchBranchingPanel/index.tsx b/src/pages/Questions/SwitchBranchingPanel/index.tsx index 4011c4b7..2c0b5bd7 100644 --- a/src/pages/Questions/SwitchBranchingPanel/index.tsx +++ b/src/pages/Questions/SwitchBranchingPanel/index.tsx @@ -25,7 +25,7 @@ export const SwitchBranchingPanel = () => { }} > { updateOpenBranchingPanel(value) }} diff --git a/src/pages/ViewPublicationPage/questions/File.tsx b/src/pages/ViewPublicationPage/questions/File.tsx index eeb7863c..6a456c1b 100644 --- a/src/pages/ViewPublicationPage/questions/File.tsx +++ b/src/pages/ViewPublicationPage/questions/File.tsx @@ -41,17 +41,77 @@ export const File = ({ currentQuestion }: FileProps) => { maxWidth: answer?.split("|")[0] ? "640px" : "550px" }} > - - - } text="5 MB максимум" /> - - {answer && currentQuestion.content.type === "picture" && ( + {answer?.split("|")[0] && ( + + Вы загрузили: + + + {answer?.split("|")[0]} + + {updateAnswer(currentQuestion.content.id, "");}} + > + + + + + + + )} + + {!answer?.split("|")[0] && ( + + + ) => event.preventDefault()} + sx={{ + width: "100%", + height: "120px", + display: "flex", + justifyContent: "space-between", + alignItems: "center", + padding: "33px 44px 33px 55px", + backgroundColor: theme.palette.background.default, + border: `1px solid ${theme.palette.grey2.main}`, + borderRadius: "8px", + }} + > + + + Добавить видео + + Принимает .mp4 и .mov формат — максимум 100мб + + + + + + )} + {answer && currentQuestion.content.type === "picture" && ( { }} /> )} - {answer?.split("|")[0] && ( - - {answer?.split("|")[0]} - - )} ); diff --git a/src/pages/ViewPublicationPage/questions/Number.tsx b/src/pages/ViewPublicationPage/questions/Number.tsx index effdc697..c5a39293 100644 --- a/src/pages/ViewPublicationPage/questions/Number.tsx +++ b/src/pages/ViewPublicationPage/questions/Number.tsx @@ -7,6 +7,7 @@ import CustomTextField from "@ui_kit/CustomTextField"; import { useQuizViewStore, updateAnswer } from "@root/quizView"; import type { QuizQuestionNumber } from "../../../model/questionTypes/number"; +import {CustomSlider} from "@ui_kit/CustomSlider"; type NumberProps = { currentQuestion: QuizQuestionNumber; diff --git a/src/pages/startPage/EditPage.tsx b/src/pages/startPage/EditPage.tsx index 3bda5a94..b9402d82 100755 --- a/src/pages/startPage/EditPage.tsx +++ b/src/pages/startPage/EditPage.tsx @@ -213,7 +213,7 @@ export default function EditPage() { sx={{ background: theme.palette.background.default, width: "100%", - padding: isMobile ? "16px" : "25px", + padding: isMobile ? "16px 16px 140px 16px" : "25px", height: "calc(100vh - 80px)", overflow: "auto", boxSizing: "border-box", @@ -258,7 +258,7 @@ export default function EditPage() { }} > { updateOpenBranchingPanel(value) }} @@ -310,9 +310,6 @@ export default function EditPage() { Логика ветвления - - Настройте связи между вопросами -