отображение шильдика
This commit is contained in:
parent
02041e2f88
commit
931b59a384
@ -28,7 +28,7 @@ type Props = {
|
|||||||
|
|
||||||
export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { settings, questions, quizId } = useQuizData();
|
const { settings, questions, quizId, show_badge } = useQuizData();
|
||||||
|
|
||||||
const [ready, setReady] = useState(false);
|
const [ready, setReady] = useState(false);
|
||||||
const [name, setName] = useState("");
|
const [name, setName] = useState("");
|
||||||
@ -274,6 +274,7 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
|||||||
 ознакомлен
|
 ознакомлен
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
{!show_badge &&
|
||||||
<Box
|
<Box
|
||||||
component={Link}
|
component={Link}
|
||||||
target={"_blank"}
|
target={"_blank"}
|
||||||
@ -302,6 +303,8 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
|||||||
Сделано на PenaQuiz
|
Сделано на PenaQuiz
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
}
|
||||||
|
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -36,7 +36,7 @@ export const Question = ({
|
|||||||
prevButton,
|
prevButton,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { settings } = useQuizData();
|
const { settings, show_badge } = useQuizData();
|
||||||
console.log(currentQuestionStepNumber)
|
console.log(currentQuestionStepNumber)
|
||||||
return (
|
return (
|
||||||
<Box sx={{
|
<Box sx={{
|
||||||
@ -55,7 +55,8 @@ export const Question = ({
|
|||||||
justifyContent: "space-between"
|
justifyContent: "space-between"
|
||||||
}}>
|
}}>
|
||||||
<QuestionByType key={currentQuestion.id} question={currentQuestion} stepNumber={currentQuestionStepNumber} />
|
<QuestionByType key={currentQuestion.id} question={currentQuestion} stepNumber={currentQuestionStepNumber} />
|
||||||
{quizThemes[settings.cfg.theme].isLight ? (
|
|
||||||
|
{!show_badge ? (quizThemes[settings.cfg.theme].isLight ? (
|
||||||
<Link target={"_blank"} href={"https://quiz.pena.digital"}>
|
<Link target={"_blank"} href={"https://quiz.pena.digital"}>
|
||||||
<NameplateLogoFQ style={{ fontSize: "34px", width: "200px", height: "auto" }} />
|
<NameplateLogoFQ style={{ fontSize: "34px", width: "200px", height: "auto" }} />
|
||||||
</Link>
|
</Link>
|
||||||
@ -63,8 +64,8 @@ export const Question = ({
|
|||||||
<Link target={"_blank"} href={"https://quiz.pena.digital"}>
|
<Link target={"_blank"} href={"https://quiz.pena.digital"}>
|
||||||
<NameplateLogoFQDark style={{ fontSize: "34px", width: "200px", height: "auto" }} />
|
<NameplateLogoFQDark style={{ fontSize: "34px", width: "200px", height: "auto" }} />
|
||||||
</Link>
|
</Link>
|
||||||
|
)) : <></>}
|
||||||
|
|
||||||
)}
|
|
||||||
</Box>
|
</Box>
|
||||||
<Footer
|
<Footer
|
||||||
stepNumber={currentQuestionStepNumber}
|
stepNumber={currentQuestionStepNumber}
|
||||||
|
@ -22,7 +22,7 @@ type ResultFormProps = {
|
|||||||
export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
|
export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const isMobile = useRootContainerSize() < 650;
|
const isMobile = useRootContainerSize() < 650;
|
||||||
const { settings } = useQuizData();
|
const { settings, show_badge } = useQuizData();
|
||||||
const spec = settings.cfg.spec
|
const spec = settings.cfg.spec
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -124,6 +124,7 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
|
|||||||
px: "20px",
|
px: "20px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
{!show_badge &&
|
||||||
<Box
|
<Box
|
||||||
component={Link}
|
component={Link}
|
||||||
target={"_blank"}
|
target={"_blank"}
|
||||||
@ -134,7 +135,7 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
|
|||||||
mt: "15px",
|
mt: "15px",
|
||||||
gap: "10px",
|
gap: "10px",
|
||||||
textDecoration: "none",
|
textDecoration: "none",
|
||||||
mb: "5px"
|
mb: "5px"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<NameplateLogo
|
<NameplateLogo
|
||||||
@ -153,6 +154,8 @@ export const ResultForm = ({ resultQuestion }: ResultFormProps) => {
|
|||||||
Сделано на PenaQuiz
|
Сделано на PenaQuiz
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
}
|
||||||
|
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
|
@ -13,7 +13,7 @@ import { setCurrentQuizStep } from "@stores/quizView";
|
|||||||
|
|
||||||
export const StartPageViewPublication = () => {
|
export const StartPageViewPublication = () => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { settings } = useQuizData();
|
const { settings, show_badge } = useQuizData();
|
||||||
const { isMobileDevice } = useUADevice();
|
const { isMobileDevice } = useUADevice();
|
||||||
const isMobile = useRootContainerSize() < 650;
|
const isMobile = useRootContainerSize() < 650;
|
||||||
const isTablet = useRootContainerSize() < 800;
|
const isTablet = useRootContainerSize() < 800;
|
||||||
@ -240,22 +240,25 @@ export const StartPageViewPublication = () => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box
|
{!show_badge &&
|
||||||
component={Link}
|
<Box
|
||||||
target={"_blank"}
|
component={Link}
|
||||||
href={"https://quiz.pena.digital"}
|
target={"_blank"}
|
||||||
sx={{
|
href={"https://quiz.pena.digital"}
|
||||||
display: "flex",
|
sx={{
|
||||||
alignItems: "center",
|
display: "flex",
|
||||||
gap: "15px",
|
alignItems: "center",
|
||||||
textDecoration: "none"
|
gap: "15px",
|
||||||
}}
|
textDecoration: "none"
|
||||||
>
|
}}
|
||||||
<NameplateLogo style={{ fontSize: "34px", color: settings.cfg.startpageType === "expanded" && !isMobile ? "#FFFFFF" : (quizThemes[settings.cfg.theme].isLight ? "#151515" : "#FFFFFF") }} />
|
>
|
||||||
<Typography sx={{ fontSize: "20px", color: settings.cfg.startpageType === "expanded" && !isMobile ? "#F5F7FF" : (quizThemes[settings.cfg.theme].isLight ? "#4D4D4D" : "#F5F7FF"), whiteSpace: "nowrap", }}>
|
<NameplateLogo style={{ fontSize: "34px", color: settings.cfg.startpageType === "expanded" && !isMobile ? "#FFFFFF" : (quizThemes[settings.cfg.theme].isLight ? "#151515" : "#FFFFFF") }} />
|
||||||
Сделано на PenaQuiz
|
<Typography sx={{ fontSize: "20px", color: settings.cfg.startpageType === "expanded" && !isMobile ? "#F5F7FF" : (quizThemes[settings.cfg.theme].isLight ? "#4D4D4D" : "#F5F7FF"), whiteSpace: "nowrap", }}>
|
||||||
</Typography>
|
Сделано на PenaQuiz
|
||||||
</Box>
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
}
|
||||||
|
|
||||||
</Box>
|
</Box>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ export interface GetQuizDataResponse {
|
|||||||
p: number;
|
p: number;
|
||||||
c: string;
|
c: string;
|
||||||
}[];
|
}[];
|
||||||
|
show_badge: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function parseQuizData(quizDataResponse: GetQuizDataResponse): Omit<QuizSettings, "recentlyCompleted"> {
|
export function parseQuizData(quizDataResponse: GetQuizDataResponse): Omit<QuizSettings, "recentlyCompleted"> {
|
||||||
@ -50,5 +51,5 @@ export function parseQuizData(quizDataResponse: GetQuizDataResponse): Omit<QuizS
|
|||||||
pausable: quizDataResponse.settings.pausable
|
pausable: quizDataResponse.settings.pausable
|
||||||
};
|
};
|
||||||
|
|
||||||
return { cnt: quizDataResponse.cnt, settings, questions: items };
|
return { cnt: quizDataResponse.cnt, settings, questions: items, show_badge: quizDataResponse.show_badge };
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user