закомментированы настройки вопросов (фичи на будущее)

This commit is contained in:
Nastya 2023-12-14 13:37:45 +03:00
parent 0c704d3723
commit 938fffa481
12 changed files with 52 additions and 36 deletions

@ -68,15 +68,15 @@ export default function ButtonsOptions({
title: "Настройки", title: "Настройки",
value: "setting", value: "setting",
}, },
{ // {
icon: ( // icon: (
<Clue // <Clue
color={switchState === "help" ? "#ffffff" : theme.palette.grey3.main} // color={switchState === "help" ? "#ffffff" : theme.palette.grey3.main}
/> // />
), // ),
title: "Подсказка", // title: "Подсказка",
value: "help", // value: "help",
}, // },
{ {
icon: ( icon: (
<Branching <Branching

@ -29,7 +29,7 @@ export default function SettingsData({ question }: SettingsDataProps) {
flexDirection: isWrappColumn ? "column" : null, flexDirection: isWrappColumn ? "column" : null,
}} }}
> >
<Box {/* <Box
sx={{ sx={{
pt: "20px", pt: "20px",
pb: isMobile ? "25px" : "20px", pb: isMobile ? "25px" : "20px",
@ -67,7 +67,7 @@ export default function SettingsData({ question }: SettingsDataProps) {
}); });
}} }}
/> />
</Box> </Box> */}
<Box <Box
sx={{ sx={{
pt: isMobile ? "0px" : "20px", pt: isMobile ? "0px" : "20px",

@ -58,7 +58,7 @@ export default function SettingDropDown({ question }: SettingDropDownProps) {
maxWidth: isFigmaTablte ? "297px" : "360px", maxWidth: isFigmaTablte ? "297px" : "360px",
}} }}
> >
<Typography {/* <Typography
sx={{ sx={{
height: isMobile ? "18px" : "auto", height: isMobile ? "18px" : "auto",
fontWeight: "500", fontWeight: "500",
@ -79,7 +79,7 @@ export default function SettingDropDown({ question }: SettingDropDownProps) {
question.content.multi = target.checked; question.content.multi = target.checked;
}) })
} }
/> /> */}
<Box <Box
sx={{ sx={{
display: isMobile ? "none" : "block", display: isMobile ? "none" : "block",

@ -30,7 +30,7 @@ export default function SettingEmoji({ question }: SettingEmojiProps) {
flexDirection: isWrappColumn ? "column" : "none", flexDirection: isWrappColumn ? "column" : "none",
}} }}
> >
<Box {/* <Box
sx={{ sx={{
pt: isMobile ? "25px" : "20px", pt: isMobile ? "25px" : "20px",
pb: isMobile ? "25px" : "20px", pb: isMobile ? "25px" : "20px",
@ -66,12 +66,12 @@ export default function SettingEmoji({ question }: SettingEmojiProps) {
question.content.own = target.checked; question.content.own = target.checked;
})} })}
/> />
</Box> </Box> */}
<Box <Box
sx={{ sx={{
pt: isMobile ? "0px" : "20px", pt: isMobile ? "0px" : "20px",
pb: "20px", pb: "20px",
pl: isTablet ? "20px" : "", pl: "20px",
pr: isFigmaTablte ? "30px" : "20px", pr: isFigmaTablte ? "30px" : "20px",
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",

@ -64,7 +64,7 @@ export default function SettingOpytionsPict({ question }: SettingOpytionsPictPro
marginRight: isFigmaTablte ? (isMobile ? "0" : "0px") : "30px", marginRight: isFigmaTablte ? (isMobile ? "0" : "0px") : "30px",
}} }}
> >
<Box {/* <Box
sx={{ sx={{
pt: isMobile ? "25px" : "20px", pt: isMobile ? "25px" : "20px",
pb: isMobile ? "25px" : "20px", pb: isMobile ? "25px" : "20px",
@ -148,7 +148,7 @@ export default function SettingOpytionsPict({ question }: SettingOpytionsPictPro
}) })
} }
/> />
</Box> </Box> */}
<Box <Box
sx={{ sx={{
pt: isMobile ? "25px" : "20px", pt: isMobile ? "25px" : "20px",
@ -161,7 +161,7 @@ export default function SettingOpytionsPict({ question }: SettingOpytionsPictPro
width: "100%", width: "100%",
}} }}
> >
<Box {/* <Box
sx={{ sx={{
marginBottom: "5px", marginBottom: "5px",
opacity: question.content.xy !== "1:1" ? 1 : 0, opacity: question.content.xy !== "1:1" ? 1 : 0,
@ -202,7 +202,7 @@ export default function SettingOpytionsPict({ question }: SettingOpytionsPictPro
isActive={question.content.format === "masonry"} isActive={question.content.format === "masonry"}
Icon={FormatIcon1} Icon={FormatIcon1}
/> />
</Box> </Box> */}
<Typography <Typography
sx={{ fontWeight: "500", fontSize: "18px", color: " #4D4D4D" }} sx={{ fontWeight: "500", fontSize: "18px", color: " #4D4D4D" }}
> >

@ -54,7 +54,7 @@ export default function SettingTextField({
marginRight: isFigmaTablte ? "0px" : "32px", marginRight: isFigmaTablte ? "0px" : "32px",
}} }}
> >
<Box {/* <Box
sx={{ sx={{
pt: isMobile ? "25px" : "20px", pt: isMobile ? "25px" : "20px",
pb: isMobile ? "25px" : "20px", pb: isMobile ? "25px" : "20px",
@ -126,7 +126,7 @@ export default function SettingTextField({
}); });
}} }}
/> />
</Box> </Box> */}
<Box <Box
sx={{ sx={{
pt: isMobile ? "0px" : "20px", pt: isMobile ? "0px" : "20px",
@ -148,7 +148,7 @@ export default function SettingTextField({
> >
Настройки вопросов Настройки вопросов
</Typography> </Typography>
<CustomCheckbox {/* <CustomCheckbox
sx={{ sx={{
display: isMobile ? "flex" : "block", display: isMobile ? "flex" : "block",
mr: isMobile ? "0px" : "16px", mr: isMobile ? "0px" : "16px",
@ -161,7 +161,7 @@ export default function SettingTextField({
question.content.autofill = target.checked; question.content.autofill = target.checked;
}); });
}} }}
/> /> */}
<CustomCheckbox <CustomCheckbox
sx={{ sx={{
display: isMobile ? "flex" : "block", display: isMobile ? "flex" : "block",

@ -40,7 +40,7 @@ export default function SettingsUpload({ question }: SettingsUploadProps) {
}} }}
> >
<Typography>Настройки вопроса</Typography> <Typography>Настройки вопроса</Typography>
<CustomCheckbox {/* <CustomCheckbox
sx={{ sx={{
display: isMobile ? "flex" : "block", display: isMobile ? "flex" : "block",
mr: isMobile ? "0px" : "16px", mr: isMobile ? "0px" : "16px",
@ -52,7 +52,7 @@ export default function SettingsUpload({ question }: SettingsUploadProps) {
question.content.autofill = target.checked; question.content.autofill = target.checked;
}); });
}} }}
/> /> */}
<CustomCheckbox <CustomCheckbox
sx={{ sx={{
display: isMobile ? "flex" : "block", display: isMobile ? "flex" : "block",

@ -57,7 +57,7 @@ export default function ResponseSettings({ question }: Props) {
> >
Настройки ответов Настройки ответов
</Typography> </Typography>
<CustomCheckbox {/* <CustomCheckbox
sx={{ mr: isMobile ? "0px" : "16px" }} sx={{ mr: isMobile ? "0px" : "16px" }}
label={"Длинный текстовый ответ"} label={"Длинный текстовый ответ"}
checked={question.content.largeCheck} checked={question.content.largeCheck}
@ -68,7 +68,7 @@ export default function ResponseSettings({ question }: Props) {
question.content.largeCheck = target.checked; question.content.largeCheck = target.checked;
}); });
}} }}
/> /> */}
<CustomCheckbox <CustomCheckbox
sx={{ mr: isMobile ? "0px" : "16px" }} sx={{ mr: isMobile ? "0px" : "16px" }}
label={"Можно несколько"} label={"Можно несколько"}

@ -39,9 +39,6 @@ useEffect(() => {
const [visualStartPage, setVisualStartPage] = useState<boolean>(); const [visualStartPage, setVisualStartPage] = useState<boolean>();
console.log("quiz ", quiz)
console.log("quiz.config ", quiz?.config)
console.log("quiz.config.noStartPage ", quiz?.config.noStartPage)
useEffect(() => { useEffect(() => {
const link = document.querySelector('link[rel="icon"]'); const link = document.querySelector('link[rel="icon"]');

@ -139,6 +139,10 @@ const VariantItem = ({
maxWidth: "685px", maxWidth: "685px",
justifyContent: "space-between", justifyContent: "space-between",
width: "100%", width: "100%",
"&.MuiFormControl-root": {
width: "100%",
}
}} }}
value={index} value={index}
labelPlacement="start" labelPlacement="start"

@ -7,6 +7,8 @@ import {
useTheme, useTheme,
} from "@mui/material"; } from "@mui/material";
import gag from "./gag.png"
import { useQuizViewStore, updateAnswer, deleteAnswer } from "@root/quizView"; import { useQuizViewStore, updateAnswer, deleteAnswer } from "@root/quizView";
import RadioCheck from "@ui_kit/RadioCheck"; import RadioCheck from "@ui_kit/RadioCheck";
@ -29,6 +31,8 @@ export const Varimg = ({ currentQuestion }: VarimgProps) => {
({ id }) => answer === id ({ id }) => answer === id
); );
console.log(currentQuestion)
return ( return (
<Box> <Box>
<Typography variant="h5">{currentQuestion.title}</Typography> <Typography variant="h5">{currentQuestion.title}</Typography>
@ -79,26 +83,37 @@ export const Varimg = ({ currentQuestion }: VarimgProps) => {
))} ))}
</Box> </Box>
</RadioGroup> </RadioGroup>
{(variant?.extendedText || currentQuestion.content.back) && ( {/* {(variant?.extendedText || currentQuestion.content.back) && ( */}
<Box <Box
sx={{ sx={{
maxWidth: "450px", maxWidth: "450px",
width: "100%", width: "100%",
height: "450px", height: "450px",
border: "1px solid #E3E3E3", border: "1px solid #9A9AAF",
borderRadius: "12px", borderRadius: "12px",
overflow: "hidden", overflow: "hidden",
display: "flex",
alignItems: "center",
justifyContent: "center",
backgroundColor: "#9A9AAF12",
color: "#9A9AAF"
}} }}
> >
<img {
answer ?
<img
src={ src={
answer ? variant?.extendedText : currentQuestion.content.back variant?.extendedText || gag
} }
style={{ width: "100%", height: "100%", objectFit: "cover" }} style={{ width: "100%", height: "100%", objectFit: "cover" }}
alt="" alt=""
/> />
:
(variant?.extendedText || "Выберите вариант ответа слева")
}
</Box> </Box>
)} {/* )} */}
</Box> </Box>
</Box> </Box>
); );

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB