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

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

@ -6,6 +6,7 @@ import TextIcon from "@icons/ContactFormIcon/TextIcon";
import AddressIcon from "@icons/ContactFormIcon/AddressIcon"; import AddressIcon from "@icons/ContactFormIcon/AddressIcon";
import { useCurrentQuiz } from "@root/quizes/hooks"; import { useCurrentQuiz } from "@root/quizes/hooks";
import { NameplateLogo } from "@icons/NameplateLogo";
import CustomCheckbox from "@ui_kit/CustomCheckbox"; import CustomCheckbox from "@ui_kit/CustomCheckbox";
import { useState } from "react"; import { useState } from "react";
import { useQuestionsStore } from "@root/questions/store"; import { useQuestionsStore } from "@root/questions/store";
@ -138,6 +139,16 @@ export const ContactForm = ({
</Typography> </Typography>
</Box> </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> </Paper>
</Box > </Box >
</Box > </Box >

@ -8,7 +8,7 @@ import { useQuestionsStore } from "@root/questions/store";
import type { AnyTypedQuizQuestion, QuizQuestionBase } from "../../model/questionTypes/shared"; import type { AnyTypedQuizQuestion, QuizQuestionBase } from "../../model/questionTypes/shared";
import { getQuestionByContentId } from "@root/questions/actions"; import { getQuestionByContentId } from "@root/questions/actions";
import { enqueueSnackbar } from "notistack"; import { enqueueSnackbar } from "notistack";
import { NameplateLogo } from "@icons/NameplateLogo"; import { NameplateLogoFQ } from "@icons/NameplateLogoFQ";
type FooterProps = { type FooterProps = {
setCurrentQuestion: (step: AnyTypedQuizQuestion) => void; setCurrentQuestion: (step: AnyTypedQuizQuestion) => void;
@ -189,22 +189,11 @@ export const Footer = ({ setCurrentQuestion, question, setShowContactForm, setSh
position: "relative", position: "relative",
padding: "15px 0", padding: "15px 0",
borderTop: `1px solid ${theme.palette.grey[400]}`, 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 <Box
sx={{ sx={{
width: "100%", width: "100%",
@ -216,6 +205,7 @@ export const Footer = ({ setCurrentQuestion, question, setShowContactForm, setSh
gap: "10px", gap: "10px",
}} }}
> >
<NameplateLogoFQ style={{ fontSize: "34px", width:"200px", height:"auto" }} />
<Box <Box
sx={{ sx={{
display: "flex", display: "flex",

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

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