From 92ec43c651c91aea0bff8ae0a23998fe3ee81940 Mon Sep 17 00:00:00 2001 From: Tamara Date: Sun, 11 Feb 2024 18:35:45 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BE=D0=B3=D1=80=D0=B0=D0=BD=D0=B8=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B8=20=D0=BF=D0=B5=D1=80=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=D1=81=20=D0=B4=D0=BB=D1=8F=20=D0=B7=D0=B0=D0=B3?= =?UTF-8?q?=D0=BE=D0=BB=D0=BE=D0=B2=D0=BA=D0=BE=D0=B2=20=D0=B8=20=D1=8E?= =?UTF-8?q?=D1=80=20=D0=B8=D0=BD=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 3 ++- src/pages/ViewPublicationPage/Question.tsx | 2 +- src/pages/ViewPublicationPage/ResultForm.tsx | 7 +++++-- .../StartPageViewPublication.tsx | 21 +++++++++++++++---- .../ViewPublicationPage/questions/File.tsx | 2 +- .../ViewPublicationPage/questions/Variant.tsx | 6 ++++-- .../ViewPublicationPage/questions/Varimg.tsx | 11 +++++++++- 7 files changed, 40 insertions(+), 12 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 2db90d5..2c54b1e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -5,7 +5,8 @@ import QuizAnswerer from "./QuizAnswerer"; import { QuizIdContext } from "./contexts/QuizIdContext"; import { RootContainerWidthContext } from "./contexts/RootContainerWidthContext"; -const defaultQuizId = "45ef7f9c-784d-4e58-badb-f6b337f08ba0"; // branching +// const defaultQuizId = "45ef7f9c-784d-4e58-badb-f6b337f08ba0"; // branching +const defaultQuizId = "48471ba0-a639-4be2-91e3-50149c4b73af"; //looooong header // const defaultQuizId = "a9d31460-132a-4479-a3f0-90241498b6f9"; // linear export default function App() { diff --git a/src/pages/ViewPublicationPage/Question.tsx b/src/pages/ViewPublicationPage/Question.tsx index 9d73360..275fb4c 100644 --- a/src/pages/ViewPublicationPage/Question.tsx +++ b/src/pages/ViewPublicationPage/Question.tsx @@ -43,7 +43,7 @@ export const Question = ({ return ( { fontWeight: 700, m: "20px 0", color: theme.palette.text.primary, + wordBreak: "break-word" }} > {resultQuestion.description} @@ -87,6 +88,7 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => { sx={{ m: "20px 0", color: theme.palette.text.primary, + wordBreak: "break-word" }} > {resultQuestion.title} @@ -99,6 +101,7 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => { sx={{ fontSize: "18px", m: "20px 0", + wordBreak: "break-word", color: theme.palette.text.primary, }} > @@ -162,7 +165,7 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => { variant="contained" sx={{ p: "10px 20px", - width: "210px", + width: "auto", height: "50px", }} > @@ -174,7 +177,7 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => { diff --git a/src/pages/ViewPublicationPage/StartPageViewPublication.tsx b/src/pages/ViewPublicationPage/StartPageViewPublication.tsx index fede8d5..c4b8a02 100644 --- a/src/pages/ViewPublicationPage/StartPageViewPublication.tsx +++ b/src/pages/ViewPublicationPage/StartPageViewPublication.tsx @@ -116,7 +116,15 @@ export const StartPageViewPublication = () => { >{settings.cfg.info.orgname} - + {settings.cfg.info.site} @@ -189,7 +197,7 @@ export const StartPageViewPublication = () => { alignItems: "center", justifyContent: "space-between", width: "100%", - flexDirection: isMobile ? "column" : "row" + flexDirection: "column" }} > @@ -215,7 +223,10 @@ export const StartPageViewPublication = () => { {quizHeaderBlock} diff --git a/src/pages/ViewPublicationPage/questions/File.tsx b/src/pages/ViewPublicationPage/questions/File.tsx index 2d54da9..c5507f3 100644 --- a/src/pages/ViewPublicationPage/questions/File.tsx +++ b/src/pages/ViewPublicationPage/questions/File.tsx @@ -109,7 +109,7 @@ const UPLOAD_FILE_DESCRIPTIONS_MAP: Record< }, video: { title: "Добавить видео", - description: "Принимает .mp4 и .mov формат — максимум 100мб", + description: "Принимает .mp4 и .mov формат — максимум 50мб", }, audio: { title: "Добавить аудиофайл", description: "Принимает аудиофайлы" }, document: { title: "Добавить документ", description: "Принимает документы" }, diff --git a/src/pages/ViewPublicationPage/questions/Variant.tsx b/src/pages/ViewPublicationPage/questions/Variant.tsx index 5b644d7..64e8f51 100644 --- a/src/pages/ViewPublicationPage/questions/Variant.tsx +++ b/src/pages/ViewPublicationPage/questions/Variant.tsx @@ -8,7 +8,7 @@ import { TextField as MuiTextField, Typography, useTheme, - TextFieldProps, + TextFieldProps, useMediaQuery, } from "@mui/material"; import { FC, useEffect } from "react"; @@ -48,6 +48,7 @@ type VariantItemProps = { export const Variant = ({ currentQuestion }: VariantProps) => { const theme = useTheme(); + const isMobile = useMediaQuery(theme.breakpoints.down(650)); const { answers, ownVariants } = useQuizViewStore(); const { answer } = answers.find( @@ -68,7 +69,8 @@ export const Variant = ({ currentQuestion }: VariantProps) => { return ( {currentQuestion.title} - + { display: "flex", margin: isMobile ? 0 : undefined, "& .MuiFormControlLabel-label": { - wordBreak: "break-word" + wordBreak: "break-word", + height: variant.answer.length <= 60 ? undefined : "60px", + overflow: "auto", + paddingLeft: "45px", } }} value={index} @@ -153,6 +156,12 @@ export const Varimg = ({ currentQuestion }: VarimgProps) => { ) : ( ) + ) : currentQuestion.content.back !== " " ? ( + ) : (currentQuestion.content.replText !== " " && currentQuestion.content.replText.length > 0) ? currentQuestion.content.replText : variant?.extendedText || isMobile ? ( "Выберите вариант ответа ниже" ) : (