шильдики в публикации

This commit is contained in:
Nastya 2023-12-21 14:47:34 +03:00
parent c382f6b7ab
commit 6df0a401b2
6 changed files with 121 additions and 49 deletions

File diff suppressed because one or more lines are too long

@ -1,6 +1,6 @@
import { FirstEntry } from "./FirstEntry"
import { ResultSettings } from "./ResultSettings"
import { decrementCurrentStep } from "@root/quizes/actions";
import { decrementCurrentStep, incrementCurrentStep } from "@root/quizes/actions";
import { Box, Button } from "@mui/material";
import ArrowLeft from "@icons/questionsPage/arrowLeft"
@ -21,6 +21,22 @@ export const ResultPage = () => {
>
<ArrowLeft />
</Button>
<Button
onClick={incrementCurrentStep}
variant="contained"
sx={{
backgroundColor: "#7E2AEA",
fontSize: "18px",
lineHeight: "18px",
width: "216px",
height: "44px",
p: "10px 20px",
}}
>
Настроить форму
</Button>
</Box>
</>
)

@ -6,6 +6,7 @@ import TextIcon from "@icons/ContactFormIcon/TextIcon";
import AddressIcon from "@icons/ContactFormIcon/AddressIcon";
import { useCurrentQuiz } from "@root/quizes/hooks";
import { NameplateLogo } from "@icons/NameplateLogo";
import CustomCheckbox from "@ui_kit/CustomCheckbox";
import { useState } from "react";
import { useQuestionsStore } from "@root/questions/store";
@ -71,19 +72,19 @@ export const ContactForm = ({
}}
>
{quiz?.config.formContact.title || "Заполните форму, чтобы получить результаты теста"}
</Typography>
{
quiz?.config.formContact.desc &&
<Typography
sx={{
textAlign: "center",
m: "20px 0",
fontSize: "18px"
}}
>
{quiz?.config.formContact.desc}
</Typography>
<Typography
sx={{
textAlign: "center",
m: "20px 0",
fontSize: "18px"
}}
>
{quiz?.config.formContact.desc}
</Typography>
}
</Box>
@ -138,6 +139,16 @@ export const ContactForm = ({
</Typography>
</Box>
<Box
sx={{
display: "flex",
alignItems: "center",
mt: "20px"
}}
>
<NameplateLogo style={{ fontSize: "34px" }} />
<Typography sx={{ fontSize: "20px", color: "#4D4D4D", whiteSpace: "nowrap" }}>Сделано на PenaQuiz</Typography>
</Box>
</Paper>
</Box >
</Box >
@ -154,14 +165,14 @@ const Inputs = () => {
if (FC.used) someUsed.push(<CustomInput title={FC.innerText || data.defaultText} desc={FC.text || data.defaultTitle} Icon={data.icon} />)
return <CustomInput title={FC.innerText || data.defaultText} desc={FC.text || data.defaultTitle} Icon={data.icon} />
})
if (someUsed.length) {
return <>{someUsed}</>
} else {
return <>
{Icons[0]}
{Icons[1]}
{Icons[2]}
{Icons[0]}
{Icons[1]}
{Icons[2]}
</>
}
}

@ -8,7 +8,7 @@ import { useQuestionsStore } from "@root/questions/store";
import type { AnyTypedQuizQuestion, QuizQuestionBase } from "../../model/questionTypes/shared";
import { getQuestionByContentId } from "@root/questions/actions";
import { enqueueSnackbar } from "notistack";
import { NameplateLogo } from "@icons/NameplateLogo";
import { NameplateLogoFQ } from "@icons/NameplateLogoFQ";
type FooterProps = {
setCurrentQuestion: (step: AnyTypedQuizQuestion) => void;
@ -189,22 +189,11 @@ export const Footer = ({ setCurrentQuestion, question, setShowContactForm, setSh
position: "relative",
padding: "15px 0",
borderTop: `1px solid ${theme.palette.grey[400]}`,
height: '75px',
display: "flex"
}}
>
<Box
sx={{
display: "flex",
alignItems: "center",
position: "absolute",
top: "-45px",
left: "50%",
transform: "translateX(-50%)",
gap: "8px",
}}
>
<NameplateLogo style={{ fontSize: "34px" }} />
<Typography sx={{ fontSize: "20px", color: "#4D4D4D", whiteSpace: "nowrap" }}>Сделано на PenaQuiz</Typography>
</Box>
<Box
sx={{
width: "100%",
@ -216,6 +205,7 @@ export const Footer = ({ setCurrentQuestion, question, setShowContactForm, setSh
gap: "10px",
}}
>
<NameplateLogoFQ style={{ fontSize: "34px", width:"200px", height:"auto" }} />
<Box
sx={{
display: "flex",

@ -66,11 +66,14 @@ export const Question = ({ questions }: QuestionProps) => {
QUESTIONS_MAP[currentQuestion.type as Exclude<QuestionType, "nonselected">];
return (
<Box>
<Box
height="100vh"
>
{!showContactForm && !showResultForm && (
<Box
sx={{
minHeight: "calc(100vh - 75px)",
height: "calc(100vh - 75px)",
width: "100%",
maxWidth: "1440px",
padding: "40px 25px 20px",

@ -6,6 +6,7 @@ import { useQuestionsStore } from "@root/questions/store";
import type { AnyTypedQuizQuestion } from "../../model/questionTypes/shared";
import YoutubeEmbedIframe from "../../ui_kit/StartPagePreview/YoutubeEmbedIframe.tsx"
import { NameplateLogo } from "@icons/NameplateLogo";
type ResultFormProps = {
currentQuestion: AnyTypedQuizQuestion;
@ -29,7 +30,7 @@ export const ResultForm = ({
(question.content.rule.parentId === "line" || currentQuestion.content.id)
);
const followNextForm = () => {
@ -100,31 +101,59 @@ export const ResultForm = ({
</Box>
{
quiz?.config.resultInfo.when === "before" &&
<Box width="100%">
<Box
sx={{
height: "100px",
boxShadow: "0 0 15px 0 rgba(0,0,0,.08)",
width: "100%",
display: "flex",
justifyContent: "center",
alignItems: "center"
width: "100%",
justifyContent: "end",
px: "20px"
}}
>
<Button
onClick={followNextForm}
variant="contained"
<Box
sx={{
p: "10px 20px",
width: "210px",
height: "50px"
display: "flex",
alignItems: "center",
mt: "15px"
}}
>
{resultQuestion.content.hint.text || "Узнать подробнее"}
</Button>
<NameplateLogo style={{ fontSize: "34px" }} />
<Typography sx={{ fontSize: "20px", color: "#4D4D4D", whiteSpace: "nowrap" }}>Сделано на PenaQuiz</Typography>
</Box>
</Box>
}
{
quiz?.config.resultInfo.when === "before" &&
<>
<Box
sx={{
boxShadow: "0 0 15px 0 rgba(0,0,0,.08)",
width: "100%",
flexDirection: "column",
display: "flex",
justifyContent: "center",
alignItems: "center",
p: "20px"
}}
>
<Button
onClick={followNextForm}
variant="contained"
sx={{
p: "10px 20px",
width: "210px",
height: "50px"
}}
>
{resultQuestion.content.hint.text || "Узнать подробнее"}
</Button>
</Box>
</>
}
</Box>
</Box>
);
};