feat: info icon tooltips

This commit is contained in:
IlyaDoronin 2023-09-18 15:34:41 +03:00
parent f158726935
commit 49271576ba
14 changed files with 581 additions and 116 deletions

@ -15,6 +15,7 @@ import {
SelectChangeEvent, SelectChangeEvent,
TextField, TextField,
Typography, Typography,
Tooltip,
useTheme, useTheme,
} from "@mui/material"; } from "@mui/material";
import Stepper from "@ui_kit/Stepper"; import Stepper from "@ui_kit/Stepper";
@ -46,11 +47,27 @@ type BackgroundType = "text" | "video";
export default function InstallQuiz() { export default function InstallQuiz() {
const buttonInstall: { icon: string; title: string; text: string }[] = [ const buttonInstall: { icon: string; title: string; text: string }[] = [
{ icon: OnButton, title: "По кнопке", text: "Конструктор кнопки или собственная кнопка" }, {
icon: OnButton,
title: "По кнопке",
text: "Конструктор кнопки или собственная кнопка",
},
{ icon: Bunner, title: "Баннером", text: "Сбоку или на всю ширину экрана" }, { icon: Bunner, title: "Баннером", text: "Сбоку или на всю ширину экрана" },
{ icon: InBidySite, title: "В тело сайта", text: "Задайте свои размеры и встройте в сайт" }, {
{ icon: AutoOpen, title: "Автооткрытие", text: "Автооткрытие поп-ап на сайте" }, icon: InBidySite,
{ icon: WidgetImg, title: "Виджет", text: "Сбоку страницы как консультант" }, title: "В тело сайта",
text: "Задайте свои размеры и встройте в сайт",
},
{
icon: AutoOpen,
title: "Автооткрытие",
text: "Автооткрытие поп-ап на сайте",
},
{
icon: WidgetImg,
title: "Виджет",
text: "Сбоку страницы как консультант",
},
]; ];
const [activeStep, setActiveStep] = React.useState(5); const [activeStep, setActiveStep] = React.useState(5);
@ -97,8 +114,20 @@ export default function InstallQuiz() {
}} }}
> >
<Box sx={{ display: "flex", alignItems: "center", gap: "10px" }}> <Box sx={{ display: "flex", alignItems: "center", gap: "10px" }}>
<LinkIcon color={theme.palette.brightPurple.main} bgcolor={"#EEE4FC"} /> <LinkIcon
<Typography>Ссылка на квиз</Typography> <InfoIcon /> color={theme.palette.brightPurple.main}
bgcolor={"#EEE4FC"}
/>
<Typography>Ссылка на квиз</Typography>
<Tooltip
title="Скопируйте или укажите свою ссылку на квиз. Ссылка должна быть от 4 до 20 символов включительно, может содержать латинские буквы, цифры, тире '-' и нижнее подчеркивание '_'."
placement="top"
>
<Box>
<InfoIcon />
</Box>
</Tooltip>
<FormControl <FormControl
fullWidth fullWidth
size="small" size="small"
@ -223,9 +252,19 @@ export default function InstallQuiz() {
}} }}
/> />
</FormControl> </FormControl>
<CopyIcon color={theme.palette.brightPurple.main} bgcolor={"#EEE4FC"} marL={"10px"} /> <CopyIcon
color={theme.palette.brightPurple.main}
bgcolor={"#EEE4FC"}
marL={"10px"}
/>
</Box> </Box>
<Box sx={{ display: "flex", alignItems: "center", justifyContent: "space-between" }}> <Box
sx={{
display: "flex",
alignItems: "center",
justifyContent: "space-between",
}}
>
<ButtonSocial /> <ButtonSocial />
<Typography sx={{ color: "#FC712F" }}>Не опубликован</Typography> <Typography sx={{ color: "#FC712F" }}>Не опубликован</Typography>
@ -245,11 +284,16 @@ export default function InstallQuiz() {
}} }}
> >
<Box sx={{ display: "flex", alignItems: "center", gap: "10px" }}> <Box sx={{ display: "flex", alignItems: "center", gap: "10px" }}>
<VkIcon color={theme.palette.brightPurple.main} bgcolor={"#EEE4FC"} /> <VkIcon
color={theme.palette.brightPurple.main}
bgcolor={"#EEE4FC"}
/>
<Typography> Вконтакте</Typography> <Typography> Вконтакте</Typography>
</Box> </Box>
<Typography>Для публикации сниппета на стене группы, призывающего пройти тест.</Typography> <Typography>
Для публикации сниппета на стене группы, призывающего пройти тест.
</Typography>
<Link <Link
component="button" component="button"
onClick={handleOpenVk} onClick={handleOpenVk}
@ -278,10 +322,16 @@ export default function InstallQuiz() {
}} }}
> >
<Box sx={{ display: "flex", alignItems: "center", gap: "10px" }}> <Box sx={{ display: "flex", alignItems: "center", gap: "10px" }}>
<DomenIcon color={theme.palette.brightPurple.main} bgcolor={"#EEE4FC"} /> <DomenIcon
color={theme.palette.brightPurple.main}
bgcolor={"#EEE4FC"}
/>
<Typography>Свой домен</Typography> <Typography>Свой домен</Typography>
</Box> </Box>
<Typography>Подключите свой домен, если хотите, чтобы квиз открывался по вашей ссылке.</Typography> <Typography>
Подключите свой домен, если хотите, чтобы квиз открывался по вашей
ссылке.
</Typography>
<Link <Link
component="button" component="button"
onClick={handleOpenDom} onClick={handleOpenDom}
@ -338,7 +388,13 @@ export default function InstallQuiz() {
> >
<img src={e.icon} /> <img src={e.icon} />
<Typography>{e.title}</Typography> <Typography>{e.title}</Typography>
<Typography sx={{ fontSize: "16px", color: theme.palette.grey2.main, textAlign: "start" }}> <Typography
sx={{
fontSize: "16px",
color: theme.palette.grey2.main,
textAlign: "start",
}}
>
{e.text} {e.text}
</Typography> </Typography>
</ButtonBase> </ButtonBase>
@ -351,8 +407,13 @@ export default function InstallQuiz() {
<AutoOpenInstall /> <AutoOpenInstall />
<VidjetInstall /> <VidjetInstall />
<InstallQzCode /> <InstallQzCode />
<Box sx={{ display: "flex", gap: "8px", justifyContent: "end", mt: "30px" }}> <Box
<Button variant="outlined" sx={{ padding: "10px 20px", borderRadius: "8px" }}> sx={{ display: "flex", gap: "8px", justifyContent: "end", mt: "30px" }}
>
<Button
variant="outlined"
sx={{ padding: "10px 20px", borderRadius: "8px" }}
>
<ArrowLeft /> <ArrowLeft />
</Button> </Button>
<Button variant="contained">Запустить рекламу</Button> <Button variant="contained">Запустить рекламу</Button>
@ -387,7 +448,9 @@ export default function InstallQuiz() {
background: theme.palette.background.default, background: theme.palette.background.default,
}} }}
> >
<Typography sx={{ color: theme.palette.grey2.main }}>Добавить квиз в группу ВК</Typography> <Typography sx={{ color: theme.palette.grey2.main }}>
Добавить квиз в группу ВК
</Typography>
</Box> </Box>
<Box <Box
sx={{ sx={{
@ -408,19 +471,31 @@ export default function InstallQuiz() {
<Typography>1. Добавьте приложение в сообщество</Typography> <Typography>1. Добавьте приложение в сообщество</Typography>
<Button <Button
variant="contained" variant="contained"
sx={{ maxWidth: "275px", display: "flex", gap: "10px", padding: "13px 15px" }} sx={{
maxWidth: "275px",
display: "flex",
gap: "10px",
padding: "13px 15px",
}}
> >
{" "} {" "}
<VkIconButton /> <VkIconButton />
Добавить приложение Добавить приложение
</Button> </Button>
<Typography sx={{ color: theme.palette.grey2.main }}> <Typography sx={{ color: theme.palette.grey2.main }}>
Для публикации сниппета на стене, призывающего пройти тест, вставьте в новую запись ссылку на приложение Для публикации сниппета на стене, призывающего пройти тест,
вставьте в новую запись ссылку на приложение
</Typography> </Typography>
<CustomTextField placeholder={""} text={"https://vk.com/app6656524_-XXXXXXXXXXX"} /> <CustomTextField
<Typography sx={{ fontSize: "14px", color: theme.palette.grey2.main }}> placeholder={""}
где XXXXXXXXXXX - id вашего сообщества (полный адрес ссылки можно узнать в браузерной строке, открыв text={"https://vk.com/app6656524_-XXXXXXXXXXX"}
приложение в вашей группе />
<Typography
sx={{ fontSize: "14px", color: theme.palette.grey2.main }}
>
где XXXXXXXXXXX - id вашего сообщества (полный адрес ссылки
можно узнать в браузерной строке, открыв приложение в вашей
группе
</Typography> </Typography>
</Box> </Box>
@ -431,13 +506,24 @@ export default function InstallQuiz() {
flexDirection: "column", flexDirection: "column",
}} }}
> >
<Typography>2. Откройте квиз в группе (вы должны быть администратором группы)</Typography> <Typography>
<Typography sx={{ fontSize: "14px", color: theme.palette.grey2.main }}> 2. Откройте квиз в группе (вы должны быть администратором
Справа снизу нажмите на значок "редактировать" В появившемся окне введите id квиза и нажмите группы)
"Привязать". Готово! Квиз привязан к группе
</Typography> </Typography>
<Typography sx={{ color: theme.palette.grey2.main }}>ID этого квиза</Typography> <Typography
<CustomTextField placeholder={""} text={"639727c5177be5004f11a0f2"} /> sx={{ fontSize: "14px", color: theme.palette.grey2.main }}
>
Справа снизу нажмите на значок "редактировать" В появившемся
окне введите id квиза и нажмите "Привязать". Готово! Квиз
привязан к группе
</Typography>
<Typography sx={{ color: theme.palette.grey2.main }}>
ID этого квиза
</Typography>
<CustomTextField
placeholder={""}
text={"639727c5177be5004f11a0f2"}
/>
</Box> </Box>
<Box sx={{ display: "flex", justifyContent: "end", gap: "10px" }}> <Box sx={{ display: "flex", justifyContent: "end", gap: "10px" }}>
@ -479,7 +565,9 @@ export default function InstallQuiz() {
background: theme.palette.background.default, background: theme.palette.background.default,
}} }}
> >
<Typography sx={{ color: theme.palette.grey2.main }}>Подключить свой домен</Typography> <Typography sx={{ color: theme.palette.grey2.main }}>
Подключить свой домен
</Typography>
</Box> </Box>
<Box <Box
sx={{ sx={{
@ -497,14 +585,21 @@ export default function InstallQuiz() {
}} }}
> >
<Typography sx={{ color: theme.palette.grey2.main }}> <Typography sx={{ color: theme.palette.grey2.main }}>
Подключите домен к проекту, чтобы создать несколько квизов на одном домене Подключите домен к проекту, чтобы создать несколько квизов на
одном домене
</Typography> </Typography>
<Typography>1. Настройте записи в регистраторе домена</Typography> <Typography>1. Настройте записи в регистраторе домена</Typography>
<Box sx={{ display: "flex" }}> <Box sx={{ display: "flex" }}>
<SelectableButton isSelected={backgroundType === "text"} onClick={() => setBackgroundType("text")}> <SelectableButton
isSelected={backgroundType === "text"}
onClick={() => setBackgroundType("text")}
>
Для поддоменов Для поддоменов
</SelectableButton> </SelectableButton>
<SelectableButton isSelected={backgroundType === "video"} onClick={() => setBackgroundType("video")}> <SelectableButton
isSelected={backgroundType === "video"}
onClick={() => setBackgroundType("video")}
>
Для доменов Для доменов
</SelectableButton> </SelectableButton>
</Box> </Box>
@ -538,7 +633,8 @@ export default function InstallQuiz() {
maxWidth: "372px", maxWidth: "372px",
}} }}
> >
Как подключить свой домен/поддомен к квизу? Ошибки при подключении домена Как подключить свой домен/поддомен к квизу? Ошибки при
подключении домена
</Link> </Link>
</Box> </Box>
@ -569,7 +665,10 @@ export default function InstallQuiz() {
// onMouseDown={} // onMouseDown={}
edge="end" edge="end"
> >
<CopyIcon color={"#ffffff"} bgcolor={theme.palette.brightPurple.main} /> <CopyIcon
color={"#ffffff"}
bgcolor={theme.palette.brightPurple.main}
/>
</IconButton> </IconButton>
</InputAdornment> </InputAdornment>
} }
@ -579,8 +678,11 @@ export default function InstallQuiz() {
</Box> </Box>
<Box sx={{ display: "flex", justifyContent: "end", gap: "10px" }}> <Box sx={{ display: "flex", justifyContent: "end", gap: "10px" }}>
<Typography sx={{ fontSize: "14px", color: theme.palette.grey2.main }}> <Typography
Привязка домена и обновление DNS записей может занять до 48 часов sx={{ fontSize: "14px", color: theme.palette.grey2.main }}
>
Привязка домена и обновление DNS записей может занять до 48
часов
</Typography> </Typography>
<Button variant="outlined" onClick={handleCloseDom}> <Button variant="outlined" onClick={handleCloseDom}>
Отмена Отмена

@ -1,5 +1,11 @@
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { Box, Typography, useMediaQuery, useTheme } from "@mui/material"; import {
Box,
Typography,
Tooltip,
useMediaQuery,
useTheme,
} from "@mui/material";
import ButtonsOptions from "../ButtonsOptions"; import ButtonsOptions from "../ButtonsOptions";
import SwitchData from "./switchData"; import SwitchData from "./switchData";
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
@ -44,7 +50,9 @@ export default function DataOptions({ totalIndex }: Props) {
> >
<Box sx={{ gap: "10px", display: "flex", flexWrap: "wrap" }}> <Box sx={{ gap: "10px", display: "flex", flexWrap: "wrap" }}>
<SelectableButton <SelectableButton
isSelected={listQuestions[quizId][totalIndex].content.type === "calendar"} isSelected={
listQuestions[quizId][totalIndex].content.type === "calendar"
}
onClick={() => { onClick={() => {
const clonContent = listQuestions[quizId][totalIndex].content; const clonContent = listQuestions[quizId][totalIndex].content;
clonContent.type = "calendar"; clonContent.type = "calendar";
@ -55,7 +63,9 @@ export default function DataOptions({ totalIndex }: Props) {
Использовать календарь Использовать календарь
</SelectableButton> </SelectableButton>
<SelectableButton <SelectableButton
isSelected={listQuestions[quizId][totalIndex].content.type === "mask"} isSelected={
listQuestions[quizId][totalIndex].content.type === "mask"
}
onClick={() => { onClick={() => {
const clonContent = listQuestions[quizId][totalIndex].content; const clonContent = listQuestions[quizId][totalIndex].content;
clonContent.type = "mask"; clonContent.type = "mask";
@ -77,10 +87,18 @@ export default function DataOptions({ totalIndex }: Props) {
> >
Пользователю будет предложено выбрать дату Пользователю будет предложено выбрать дату
</Typography> </Typography>
<InfoIcon /> <Tooltip title="Выбор даты." placement="top">
<Box>
<InfoIcon />
</Box>
</Tooltip>
</Box> </Box>
</Box> </Box>
<ButtonsOptions switchState={switchState} SSHC={SSHC} totalIndex={totalIndex} /> <ButtonsOptions
switchState={switchState}
SSHC={SSHC}
totalIndex={totalIndex}
/>
<SwitchData switchState={switchState} totalIndex={totalIndex} /> <SwitchData switchState={switchState} totalIndex={totalIndex} />
</> </>
); );

@ -1,5 +1,11 @@
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { Box, Typography, useMediaQuery, useTheme } from "@mui/material"; import {
Box,
Typography,
Tooltip,
useMediaQuery,
useTheme,
} from "@mui/material";
import CustomCheckbox from "@ui_kit/CustomCheckbox"; import CustomCheckbox from "@ui_kit/CustomCheckbox";
import CustomTextField from "@ui_kit/CustomTextField"; import CustomTextField from "@ui_kit/CustomTextField";
import InfoIcon from "../../../assets/icons/InfoIcon"; import InfoIcon from "../../../assets/icons/InfoIcon";
@ -16,7 +22,13 @@ export default function SettingsData({ totalIndex }: SettingsDataProps) {
const isWrappColumn = useMediaQuery(theme.breakpoints.down(980)); const isWrappColumn = useMediaQuery(theme.breakpoints.down(980));
return ( return (
<Box sx={{ display: "flex", justifyContent: "space-between", flexDirection: isWrappColumn ? "column" : null }}> <Box
sx={{
display: "flex",
justifyContent: "space-between",
flexDirection: isWrappColumn ? "column" : null,
}}
>
<Box sx={{ padding: "20px" }}> <Box sx={{ padding: "20px" }}>
<Typography>Настройки календаря</Typography> <Typography>Настройки календаря</Typography>
<CustomCheckbox <CustomCheckbox
@ -41,7 +53,9 @@ export default function SettingsData({ totalIndex }: SettingsDataProps) {
</Box> </Box>
<Box <Box
sx={{ sx={{
padding: isWrappColumn ? "0px 20px 20px 20px " : "20px 20px 20px 20px", padding: isWrappColumn
? "0px 20px 20px 20px "
: "20px 20px 20px 20px",
minWidth: isWrappColumn ? null : "350px", minWidth: isWrappColumn ? null : "350px",
marginRight: "30px", marginRight: "30px",
}} }}
@ -70,8 +84,15 @@ export default function SettingsData({ totalIndex }: SettingsDataProps) {
updateQuestionsList(quizId, totalIndex, { content: clonContent }); updateQuestionsList(quizId, totalIndex, { content: clonContent });
}} }}
/>{" "} />
<InfoIcon /> <Tooltip
title="Будет отображаться как заголовок вопроса в приходящих заявках."
placement="top"
>
<Box>
<InfoIcon />
</Box>
</Tooltip>
</Box> </Box>
{listQuestions[quizId][totalIndex].content.innerNameCheck && ( {listQuestions[quizId][totalIndex].content.innerNameCheck && (
<CustomTextField <CustomTextField

@ -1,5 +1,11 @@
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { Box, Typography, useMediaQuery, useTheme } from "@mui/material"; import {
Box,
Typography,
Tooltip,
useMediaQuery,
useTheme,
} from "@mui/material";
import CustomCheckbox from "@ui_kit/CustomCheckbox"; import CustomCheckbox from "@ui_kit/CustomCheckbox";
import CustomTextField from "@ui_kit/CustomTextField"; import CustomTextField from "@ui_kit/CustomTextField";
import InfoIcon from "../../../assets/icons/InfoIcon"; import InfoIcon from "../../../assets/icons/InfoIcon";
@ -17,7 +23,13 @@ export default function SettingEmoji({ totalIndex }: SettingEmojiProps) {
const isMobile = useMediaQuery(theme.breakpoints.down(790)); const isMobile = useMediaQuery(theme.breakpoints.down(790));
return ( return (
<Box sx={{ display: "flex", justifyContent: "space-between", flexDirection: isWrappColumn ? "column" : null }}> <Box
sx={{
display: "flex",
justifyContent: "space-between",
flexDirection: isWrappColumn ? "column" : null,
}}
>
<Box sx={{ padding: "20px" }}> <Box sx={{ padding: "20px" }}>
<Typography>Настройки ответов</Typography> <Typography>Настройки ответов</Typography>
<CustomCheckbox <CustomCheckbox
@ -41,7 +53,9 @@ export default function SettingEmoji({ totalIndex }: SettingEmojiProps) {
</Box> </Box>
<Box <Box
sx={{ sx={{
padding: isWrappColumn ? "0px 20px 20px 20px " : "20px 20px 20px 20px ", padding: isWrappColumn
? "0px 20px 20px 20px "
: "20px 20px 20px 20px ",
minWidth: isWrappColumn ? null : "350px", minWidth: isWrappColumn ? null : "350px",
marginRight: "30px", marginRight: "30px",
}} }}
@ -70,8 +84,15 @@ export default function SettingEmoji({ totalIndex }: SettingEmojiProps) {
updateQuestionsList(quizId, totalIndex, { content: clonContent }); updateQuestionsList(quizId, totalIndex, { content: clonContent });
}} }}
/>{" "} />
<InfoIcon /> <Tooltip
title="Будет отображаться как заголовок вопроса в приходящих заявках."
placement="top"
>
<Box>
<InfoIcon />
</Box>
</Tooltip>
</Box> </Box>
{listQuestions[quizId][totalIndex].content.innerNameCheck && ( {listQuestions[quizId][totalIndex].content.innerNameCheck && (
<CustomTextField <CustomTextField

@ -1,5 +1,11 @@
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { Box, Typography, useMediaQuery, useTheme } from "@mui/material"; import {
Box,
Typography,
Tooltip,
useMediaQuery,
useTheme,
} from "@mui/material";
import CustomCheckbox from "@ui_kit/CustomCheckbox"; import CustomCheckbox from "@ui_kit/CustomCheckbox";
import CustomTextField from "@ui_kit/CustomTextField"; import CustomTextField from "@ui_kit/CustomTextField";
import InfoIcon from "../../../assets/icons/InfoIcon"; import InfoIcon from "../../../assets/icons/InfoIcon";
@ -104,7 +110,14 @@ export default function SettingOptionsAndPict({
}); });
}} }}
/> />
<InfoIcon /> <Tooltip
title="Будет отображаться как заголовок вопроса в приходящих заявках."
placement="top"
>
<Box>
<InfoIcon />
</Box>
</Tooltip>
</Box> </Box>
{listQuestions[quizId][totalIndex].content.innerNameCheck && ( {listQuestions[quizId][totalIndex].content.innerNameCheck && (
<CustomTextField <CustomTextField

@ -1,6 +1,13 @@
import { useEffect } from "react"; import { useEffect } from "react";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { Box, Button, Typography, useMediaQuery, useTheme } from "@mui/material"; import {
Box,
Button,
Typography,
Tooltip,
useMediaQuery,
useTheme,
} from "@mui/material";
import CustomCheckbox from "@ui_kit/CustomCheckbox"; import CustomCheckbox from "@ui_kit/CustomCheckbox";
import CustomTextField from "@ui_kit/CustomTextField"; import CustomTextField from "@ui_kit/CustomTextField";
@ -36,12 +43,22 @@ export function SelectIconButton({ Icon, isActive = false, onClick }: Props) {
<Button <Button
onClick={onClick} onClick={onClick}
variant="outlined" variant="outlined"
startIcon={<Icon color={isActive ? theme.palette.navbarbg.main : theme.palette.brightPurple.main} />} startIcon={
<Icon
color={
isActive
? theme.palette.navbarbg.main
: theme.palette.brightPurple.main
}
/>
}
sx={{ sx={{
backgroundColor: isActive ? theme.palette.brightPurple.main : "#eee4fc", backgroundColor: isActive ? theme.palette.brightPurple.main : "#eee4fc",
borderRadius: 0, borderRadius: 0,
border: "none", border: "none",
color: isActive ? theme.palette.brightPurple.main : theme.palette.grey2.main, color: isActive
? theme.palette.brightPurple.main
: theme.palette.grey2.main,
p: "7px", p: "7px",
width: "auto", width: "auto",
minWidth: 0, minWidth: 0,
@ -51,14 +68,18 @@ export function SelectIconButton({ Icon, isActive = false, onClick }: Props) {
}, },
"&:hover": { "&:hover": {
border: "none", border: "none",
borderColor: isActive ? theme.palette.brightPurple.main : theme.palette.grey2.main, borderColor: isActive
? theme.palette.brightPurple.main
: theme.palette.grey2.main,
}, },
}} }}
/> />
); );
} }
export default function SettingOpytionsPict({ totalIndex }: SettingOpytionsPictProps) { export default function SettingOpytionsPict({
totalIndex,
}: SettingOpytionsPictProps) {
const quizId = Number(useParams().quizId); const quizId = Number(useParams().quizId);
const { listQuestions } = questionStore(); const { listQuestions } = questionStore();
const theme = useTheme(); const theme = useTheme();
@ -100,13 +121,17 @@ export default function SettingOpytionsPict({ totalIndex }: SettingOpytionsPictP
<SelectIconButton <SelectIconButton
key={index} key={index}
onClick={() => updateProportions(value)} onClick={() => updateProportions(value)}
isActive={listQuestions[quizId][totalIndex].content.xy === value} isActive={
listQuestions[quizId][totalIndex].content.xy === value
}
Icon={icon} Icon={icon}
/> />
))} ))}
</Box> </Box>
<Typography sx={{ marginBottom: "15px" }}>Настройки ответов</Typography> <Typography sx={{ marginBottom: "15px" }}>
Настройки ответов
</Typography>
<CustomCheckbox <CustomCheckbox
sx={{ display: "block" }} sx={{ display: "block" }}
@ -166,7 +191,9 @@ export default function SettingOpytionsPict({ totalIndex }: SettingOpytionsPictP
}, },
}) })
} }
isActive={listQuestions[quizId][totalIndex].content.format === "carousel"} isActive={
listQuestions[quizId][totalIndex].content.format === "carousel"
}
Icon={FormatIcon2} Icon={FormatIcon2}
/> />
<SelectIconButton <SelectIconButton
@ -178,11 +205,15 @@ export default function SettingOpytionsPict({ totalIndex }: SettingOpytionsPictP
}, },
}) })
} }
isActive={listQuestions[quizId][totalIndex].content.format === "masonry"} isActive={
listQuestions[quizId][totalIndex].content.format === "masonry"
}
Icon={FormatIcon1} Icon={FormatIcon1}
/> />
</Box> </Box>
<Typography sx={{ marginBottom: "15px" }}>Настройки вопросов</Typography> <Typography sx={{ marginBottom: "15px" }}>
Настройки вопросов
</Typography>
<CustomCheckbox <CustomCheckbox
label={"Необязательный вопрос"} label={"Необязательный вопрос"}
checked={listQuestions[quizId][totalIndex].content.required} checked={listQuestions[quizId][totalIndex].content.required}
@ -210,7 +241,14 @@ export default function SettingOpytionsPict({ totalIndex }: SettingOpytionsPictP
}) })
} }
/> />
<InfoIcon /> <Tooltip
title="Будет отображаться как заголовок вопроса в приходящих заявках."
placement="top"
>
<Box>
<InfoIcon />
</Box>
</Tooltip>
</Box> </Box>
{listQuestions[quizId][totalIndex].content.innerNameCheck && ( {listQuestions[quizId][totalIndex].content.innerNameCheck && (
<CustomTextField <CustomTextField

@ -1,6 +1,6 @@
import { useState } from "react"; import { useState } from "react";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { Box, Typography, useTheme } from "@mui/material"; import { Box, Typography, Tooltip, useTheme } from "@mui/material";
import CustomTextField from "@ui_kit/CustomTextField"; import CustomTextField from "@ui_kit/CustomTextField";
import ButtonsOptions from "../ButtonsOptions"; import ButtonsOptions from "../ButtonsOptions";
@ -57,10 +57,21 @@ export default function OwnTextField({ totalIndex }: Props) {
> >
Пользователю будет дано поле для ввода значения{" "} Пользователю будет дано поле для ввода значения{" "}
</Typography> </Typography>
<InfoIcon /> <Tooltip
title="Будет использоваться для ввода значения."
placement="top"
>
<Box>
<InfoIcon />
</Box>
</Tooltip>
</Box> </Box>
</Box> </Box>
<ButtonsOptions switchState={switchState} SSHC={SSHC} totalIndex={totalIndex} /> <ButtonsOptions
switchState={switchState}
SSHC={SSHC}
totalIndex={totalIndex}
/>
<SwitchTextField switchState={switchState} totalIndex={totalIndex} /> <SwitchTextField switchState={switchState} totalIndex={totalIndex} />
</> </>
); );

@ -6,6 +6,7 @@ import {
Radio, Radio,
RadioGroup, RadioGroup,
Typography, Typography,
Tooltip,
useMediaQuery, useMediaQuery,
useTheme, useTheme,
} from "@mui/material"; } from "@mui/material";
@ -33,7 +34,9 @@ const ANSWER_TYPES: Answer[] = [
{ name: "Только числа", value: "number" }, { name: "Только числа", value: "number" },
]; ];
export default function SettingTextField({ totalIndex }: SettingTextFieldProps) { export default function SettingTextField({
totalIndex,
}: SettingTextFieldProps) {
const { listQuestions } = questionStore(); const { listQuestions } = questionStore();
const quizId = Number(useParams().quizId); const quizId = Number(useParams().quizId);
const theme = useTheme(); const theme = useTheme();
@ -55,7 +58,9 @@ export default function SettingTextField({ totalIndex }: SettingTextFieldProps)
<RadioGroup <RadioGroup
aria-labelledby="demo-controlled-radio-buttons-group" aria-labelledby="demo-controlled-radio-buttons-group"
name="controlled-radio-buttons-group" name="controlled-radio-buttons-group"
value={ANSWER_TYPES.findIndex(({ value }) => listQuestions[quizId][totalIndex].content[value])} value={ANSWER_TYPES.findIndex(
({ value }) => listQuestions[quizId][totalIndex].content[value]
)}
onChange={({ target }: React.ChangeEvent<HTMLInputElement>) => { onChange={({ target }: React.ChangeEvent<HTMLInputElement>) => {
const clonContent = { const clonContent = {
...listQuestions[quizId][totalIndex].content, ...listQuestions[quizId][totalIndex].content,
@ -76,7 +81,9 @@ export default function SettingTextField({ totalIndex }: SettingTextFieldProps)
"& .MuiRadio-root": { padding: "8px 9px" }, "& .MuiRadio-root": { padding: "8px 9px" },
}} }}
value={index} value={index}
control={<Radio icon={<CheckIcon />} checkedIcon={<CheckedIcon />} />} control={
<Radio icon={<CheckIcon />} checkedIcon={<CheckedIcon />} />
}
label={name} label={name}
/> />
))} ))}
@ -117,8 +124,15 @@ export default function SettingTextField({ totalIndex }: SettingTextFieldProps)
updateQuestionsList(quizId, totalIndex, { content: clonContent }); updateQuestionsList(quizId, totalIndex, { content: clonContent });
}} }}
/>{" "} />
<InfoIcon /> <Tooltip
title="Будет отображаться как заголовок вопроса в приходящих заявках."
placement="top"
>
<Box>
<InfoIcon />
</Box>
</Tooltip>
</Box> </Box>
{listQuestions[quizId][totalIndex].content.innerNameCheck && ( {listQuestions[quizId][totalIndex].content.innerNameCheck && (
<CustomTextField <CustomTextField

@ -1,5 +1,5 @@
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { Box, Typography } from "@mui/material"; import { Box, Typography, Tooltip } from "@mui/material";
import CustomCheckbox from "@ui_kit/CustomCheckbox"; import CustomCheckbox from "@ui_kit/CustomCheckbox";
import CustomTextField from "@ui_kit/CustomTextField"; import CustomTextField from "@ui_kit/CustomTextField";
@ -34,7 +34,14 @@ export default function SettingPageOptions({
}) })
} }
/> />
<InfoIcon /> <Tooltip
title="Будет отображаться как заголовок вопроса в приходящих заявках."
placement="top"
>
<Box>
<InfoIcon />
</Box>
</Tooltip>
</Box> </Box>
{listQuestions[quizId][totalIndex].content.innerNameCheck && ( {listQuestions[quizId][totalIndex].content.innerNameCheck && (
<CustomTextField <CustomTextField

@ -4,6 +4,7 @@ import {
ButtonBase, ButtonBase,
Slider, Slider,
Typography, Typography,
Tooltip,
useMediaQuery, useMediaQuery,
useTheme, useTheme,
} from "@mui/material"; } from "@mui/material";
@ -145,8 +146,15 @@ export default function SettingSlider({ totalIndex }: SettingSliderProps) {
updateQuestionsList(quizId, totalIndex, { content: clonContent }); updateQuestionsList(quizId, totalIndex, { content: clonContent });
}} }}
/>{" "} />
<InfoIcon /> <Tooltip
title="Будет отображаться как заголовок вопроса в приходящих заявках."
placement="top"
>
<Box>
<InfoIcon />
</Box>
</Tooltip>
</Box> </Box>
{listQuestions[quizId][totalIndex].content.innerNameCheck && ( {listQuestions[quizId][totalIndex].content.innerNameCheck && (
<CustomTextField <CustomTextField

@ -1,5 +1,11 @@
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { Box, Typography, useMediaQuery, useTheme } from "@mui/material"; import {
Box,
Typography,
Tooltip,
useMediaQuery,
useTheme,
} from "@mui/material";
import CustomCheckbox from "@ui_kit/CustomCheckbox"; import CustomCheckbox from "@ui_kit/CustomCheckbox";
import CustomTextField from "@ui_kit/CustomTextField"; import CustomTextField from "@ui_kit/CustomTextField";
import InfoIcon from "../../../assets/icons/InfoIcon"; import InfoIcon from "../../../assets/icons/InfoIcon";
@ -17,7 +23,13 @@ export default function SettingSlider({ totalIndex }: SettingSliderProps) {
const isMobile = useMediaQuery(theme.breakpoints.down(790)); const isMobile = useMediaQuery(theme.breakpoints.down(790));
return ( return (
<Box sx={{ display: "flex", justifyContent: "space-between", flexDirection: isWrappColumn ? "column" : null }}> <Box
sx={{
display: "flex",
justifyContent: "space-between",
flexDirection: isWrappColumn ? "column" : null,
}}
>
<Box sx={{ padding: "20px" }}> <Box sx={{ padding: "20px" }}>
<Typography>Настройки ползунка</Typography> <Typography>Настройки ползунка</Typography>
<CustomCheckbox <CustomCheckbox
@ -55,8 +67,15 @@ export default function SettingSlider({ totalIndex }: SettingSliderProps) {
updateQuestionsList(quizId, totalIndex, { content: clonContent }); updateQuestionsList(quizId, totalIndex, { content: clonContent });
}} }}
/>{" "} />
<InfoIcon /> <Tooltip
title="Будет отображаться как заголовок вопроса в приходящих заявках."
placement="top"
>
<Box>
<InfoIcon />
</Box>
</Tooltip>
</Box> </Box>
{listQuestions[quizId][totalIndex].content.innerNameCheck && ( {listQuestions[quizId][totalIndex].content.innerNameCheck && (
<CustomTextField <CustomTextField

@ -1,5 +1,5 @@
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { Box, Typography } from "@mui/material"; import { Box, Typography, Tooltip } from "@mui/material";
import CustomCheckbox from "@ui_kit/CustomCheckbox"; import CustomCheckbox from "@ui_kit/CustomCheckbox";
import CustomTextField from "@ui_kit/CustomTextField"; import CustomTextField from "@ui_kit/CustomTextField";
@ -50,8 +50,15 @@ export default function SettingsUpload({ totalIndex }: SettingsUploadProps) {
updateQuestionsList(quizId, totalIndex, { content: clonContent }); updateQuestionsList(quizId, totalIndex, { content: clonContent });
}} }}
/>{" "} />
<InfoIcon /> <Tooltip
title="Будет отображаться как заголовок вопроса в приходящих заявках."
placement="top"
>
<Box>
<InfoIcon />
</Box>
</Tooltip>
</Box> </Box>
{listQuestions[quizId][totalIndex].content.innerNameCheck && ( {listQuestions[quizId][totalIndex].content.innerNameCheck && (
<CustomTextField <CustomTextField

@ -1,5 +1,11 @@
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { Box, Typography, useMediaQuery, useTheme } from "@mui/material"; import {
Box,
Typography,
Tooltip,
useMediaQuery,
useTheme,
} from "@mui/material";
import CustomCheckbox from "@ui_kit/CustomCheckbox"; import CustomCheckbox from "@ui_kit/CustomCheckbox";
import InfoIcon from "../../../assets/icons/InfoIcon"; import InfoIcon from "../../../assets/icons/InfoIcon";
import CustomTextField from "@ui_kit/CustomTextField"; import CustomTextField from "@ui_kit/CustomTextField";
@ -83,10 +89,19 @@ export default function ResponseSettings({ totalIndex }: Props) {
clonContent.innerName = ""; clonContent.innerName = "";
} }
updateQuestionsList(quizId, totalIndex, { content: clonContent }); updateQuestionsList(quizId, totalIndex, {
content: clonContent,
});
}} }}
/> />
<InfoIcon /> <Tooltip
title="Будет отображаться как заголовок вопроса в приходящих заявках."
placement="top"
>
<Box>
<InfoIcon />
</Box>
</Tooltip>
</Box> </Box>
{listQuestions[quizId][totalIndex].content.innerNameCheck && ( {listQuestions[quizId][totalIndex].content.innerNameCheck && (
<CustomTextField <CustomTextField

@ -7,6 +7,7 @@ import {
FormControlLabel, FormControlLabel,
MenuItem, MenuItem,
Select, Select,
Tooltip,
Typography, Typography,
useTheme, useTheme,
} from "@mui/material"; } from "@mui/material";
@ -40,9 +41,21 @@ interface HandleNext {
} }
const designTypes = [ const designTypes = [
["standard", (color: string) => <LayoutStandartIcon color={color} />, "Standard"], [
["expanded", (color: string) => <LayoutExpandedIcon color={color} />, "Expanded"], "standard",
["centered", (color: string) => <LayoutCenteredIcon color={color} />, "Centered"], (color: string) => <LayoutStandartIcon color={color} />,
"Standard",
],
[
"expanded",
(color: string) => <LayoutExpandedIcon color={color} />,
"Expanded",
],
[
"centered",
(color: string) => <LayoutCenteredIcon color={color} />,
"Centered",
],
] as const; ] as const;
// type DesignType = typeof designTypes[number][0]; // type DesignType = typeof designTypes[number][0];
@ -56,7 +69,9 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
const designType = listQuizes[params].startpage; const designType = listQuizes[params].startpage;
const StartPageClone = listQuizes[params]; const StartPageClone = listQuizes[params];
console.log(StartPageClone); console.log(StartPageClone);
const [backgroundType, setBackgroundType] = useState(listQuizes[params].config.startpage.background.type); const [backgroundType, setBackgroundType] = useState(
listQuizes[params].config.startpage.background.type
);
const [alignType, setAlignType] = useState<AlignType>("left"); const [alignType, setAlignType] = useState<AlignType>("left");
const videoHC = (videoInp: HTMLInputElement) => { const videoHC = (videoInp: HTMLInputElement) => {
@ -148,7 +163,15 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
flex: `1 1 342px`, flex: `1 1 342px`,
}} }}
> >
<Typography sx={{ fontWeight: 500, color: theme.palette.grey3.main, mb: "14px" }}>Дизайн</Typography> <Typography
sx={{
fontWeight: 500,
color: theme.palette.grey3.main,
mb: "14px",
}}
>
Дизайн
</Typography>
<FormControl <FormControl
fullWidth fullWidth
size="small" size="small"
@ -163,7 +186,9 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
variant="outlined" variant="outlined"
value={designType} value={designType}
displayEmpty displayEmpty
onChange={(e) => updateQuizesList(params, { startpage: e.target.value })} onChange={(e) =>
updateQuizesList(params, { startpage: e.target.value })
}
sx={{ sx={{
height: "48px", height: "48px",
borderRadius: "8px", borderRadius: "8px",
@ -218,13 +243,26 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
color: theme.palette.grey2.main, color: theme.palette.grey2.main,
}} }}
> >
{type[1](type[0] === designType ? theme.palette.orange.main : theme.palette.grey2.main)} {type[1](
type[0] === designType
? theme.palette.orange.main
: theme.palette.grey2.main
)}
{type[2]} {type[2]}
</MenuItem> </MenuItem>
))} ))}
</Select> </Select>
</FormControl> </FormControl>
<Typography sx={{ fontWeight: 500, color: theme.palette.grey3.main, mt: "20px", mb: "14px" }}>Фон</Typography> <Typography
sx={{
fontWeight: 500,
color: theme.palette.grey3.main,
mt: "20px",
mb: "14px",
}}
>
Фон
</Typography>
<Box <Box
sx={{ sx={{
display: "flex", display: "flex",
@ -267,7 +305,14 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
flexDirection: "column", flexDirection: "column",
}} }}
> >
<Typography sx={{ fontWeight: 500, color: theme.palette.grey3.main, mt: "20px", mb: "14px" }}> <Typography
sx={{
fontWeight: 500,
color: theme.palette.grey3.main,
mt: "20px",
mb: "14px",
}}
>
Изображение Изображение
</Typography> </Typography>
<DropZone text={"5 MB максимум"} heightImg={"110px"} /> <DropZone text={"5 MB максимум"} heightImg={"110px"} />
@ -284,7 +329,12 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
}} }}
> >
<FormControlLabel <FormControlLabel
control={<Checkbox icon={<IconCheck />} checkedIcon={<MobilePhoneIcon bgcolor={"#EEE4FC"} />} />} control={
<Checkbox
icon={<IconCheck />}
checkedIcon={<MobilePhoneIcon bgcolor={"#EEE4FC"} />}
/>
}
label="мобильная версия" label="мобильная версия"
sx={{ sx={{
color: theme.palette.brightPurple.main, color: theme.palette.brightPurple.main,
@ -299,7 +349,14 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
/> />
{mobileVersion ? ( {mobileVersion ? (
<Box sx={{ display: "flex", flexDirection: "column" }}> <Box sx={{ display: "flex", flexDirection: "column" }}>
<Typography sx={{ fontWeight: 500, color: theme.palette.grey3.main, mt: "11px", mb: "14px" }}> <Typography
sx={{
fontWeight: 500,
color: theme.palette.grey3.main,
mt: "11px",
mb: "14px",
}}
>
Изображение для мобильной версии Изображение для мобильной версии
</Typography> </Typography>
<DropZone text={"5 MB максимум"} heightImg={"110px"} /> <DropZone text={"5 MB максимум"} heightImg={"110px"} />
@ -325,11 +382,25 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
mb: "14px", mb: "14px",
}} }}
> >
<Typography sx={{ fontWeight: 500, color: theme.palette.grey3.main }}>Добавить видео</Typography> <Typography
<InfoIcon /> sx={{ fontWeight: 500, color: theme.palette.grey3.main }}
>
Добавить видео
</Typography>
<Tooltip title="Можно загрузить видео." placement="top">
<Box>
<InfoIcon />
</Box>
</Tooltip>
</Box> </Box>
<ButtonBase component="label" sx={{ justifyContent: "flex-start" }}> <ButtonBase component="label" sx={{ justifyContent: "flex-start" }}>
<input onChange={(event) => videoHC(event.target)} hidden accept=".mp4" multiple type="file" /> <input
onChange={(event) => videoHC(event.target)}
hidden
accept=".mp4"
multiple
type="file"
/>
<UploadBox <UploadBox
icon={<UploadIcon />} icon={<UploadIcon />}
sx={{ sx={{
@ -340,7 +411,14 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
/> />
</ButtonBase> </ButtonBase>
{video ? <video src={video} width="400" controls /> : null} {video ? <video src={video} width="400" controls /> : null}
<Typography sx={{ fontWeight: 500, color: theme.palette.grey3.main, mt: "20px", mb: "5px" }}> <Typography
sx={{
fontWeight: 500,
color: theme.palette.grey3.main,
mt: "20px",
mb: "5px",
}}
>
Настройки видео Настройки видео
</Typography> </Typography>
<CustomCheckbox <CustomCheckbox
@ -352,13 +430,27 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
updateQuizesList(params, { config: SPageClone }); updateQuizesList(params, { config: SPageClone });
}} }}
/> />
<Typography sx={{ fontWeight: 500, color: theme.palette.grey3.main, mt: "11px", mb: "14px" }}> <Typography
sx={{
fontWeight: 500,
color: theme.palette.grey3.main,
mt: "11px",
mb: "14px",
}}
>
Изображение для мобильной версии Изображение для мобильной версии
</Typography> </Typography>
<DropZone text={"5 MB максимум"} heightImg={"110px"} /> <DropZone text={"5 MB максимум"} heightImg={"110px"} />
</Box> </Box>
<Typography sx={{ fontWeight: 500, color: theme.palette.grey3.main, mt: "20px", mb: "14px" }}> <Typography
sx={{
fontWeight: 500,
color: theme.palette.grey3.main,
mt: "20px",
mb: "14px",
}}
>
Расположение элементов Расположение элементов
</Typography> </Typography>
<Box <Box
@ -406,11 +498,26 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
flexDirection: "column", flexDirection: "column",
}} }}
> >
<Typography sx={{ fontWeight: 500, color: theme.palette.grey3.main, margin: "20px 0" }}>Логотип</Typography> <Typography
sx={{
fontWeight: 500,
color: theme.palette.grey3.main,
margin: "20px 0",
}}
>
Логотип
</Typography>
<DropZone text={"5 MB максимум"} heightImg={"110px"} /> <DropZone text={"5 MB максимум"} heightImg={"110px"} />
</Box> </Box>
<Typography sx={{ fontWeight: 500, color: theme.palette.grey3.main, mt: "20px", mb: "14px" }}> <Typography
sx={{
fontWeight: 500,
color: theme.palette.grey3.main,
mt: "20px",
mb: "14px",
}}
>
Favicon Favicon
</Typography> </Typography>
<Box <Box
@ -420,7 +527,11 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
gap: "10px", gap: "10px",
}} }}
> >
<DropFav sx={{ height: "48px", width: "48px" }} heightImg={"48px"} widthImg={"48px"} /> <DropFav
sx={{ height: "48px", width: "48px" }}
heightImg={"48px"}
widthImg={"48px"}
/>
<Typography <Typography
sx={{ sx={{
@ -442,13 +553,28 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
flex: `1 1 795px`, flex: `1 1 795px`,
}} }}
> >
<Typography sx={{ fontWeight: 500, color: theme.palette.grey3.main, mb: "14px" }}>Заголовок</Typography> <Typography
sx={{
fontWeight: 500,
color: theme.palette.grey3.main,
mb: "14px",
}}
>
Заголовок
</Typography>
<CustomTextField <CustomTextField
placeholder="Текст-заполнитель — это текст, который" placeholder="Текст-заполнитель — это текст, который"
text={listQuizes[params].name} text={listQuizes[params].name}
onChange={(e) => updateQuizesList(params, { name: e.target.value })} onChange={(e) => updateQuizesList(params, { name: e.target.value })}
/> />
<Typography sx={{ fontWeight: 500, color: theme.palette.grey3.main, mt: "20px", mb: "14px" }}> <Typography
sx={{
fontWeight: 500,
color: theme.palette.grey3.main,
mt: "20px",
mb: "14px",
}}
>
Текст Текст
</Typography> </Typography>
<CustomTextField <CustomTextField
@ -456,7 +582,14 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
text={listQuizes[params].config.startpage.description} text={listQuizes[params].config.startpage.description}
onChange={mutationHC} onChange={mutationHC}
/> />
<Typography sx={{ fontWeight: 500, color: theme.palette.grey3.main, mt: "20px", mb: "14px" }}> <Typography
sx={{
fontWeight: 500,
color: theme.palette.grey3.main,
mt: "20px",
mb: "14px",
}}
>
Текст кнопки Текст кнопки
</Typography> </Typography>
<CustomTextField <CustomTextField
@ -464,7 +597,14 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
text={listQuizes[params].config.startpage.button} text={listQuizes[params].config.startpage.button}
onChange={mutationButtonHC} onChange={mutationButtonHC}
/> />
<Typography sx={{ fontWeight: 500, color: theme.palette.grey3.main, mt: "20px", mb: "14px" }}> <Typography
sx={{
fontWeight: 500,
color: theme.palette.grey3.main,
mt: "20px",
mb: "14px",
}}
>
Телефон Телефон
</Typography> </Typography>
<CustomTextField <CustomTextField
@ -482,7 +622,14 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
updateQuizesList(params, { config: SPageClone }); updateQuizesList(params, { config: SPageClone });
}} }}
/> />
<Typography sx={{ fontWeight: 500, color: theme.palette.grey3.main, mt: "11px", mb: "14px" }}> <Typography
sx={{
fontWeight: 500,
color: theme.palette.grey3.main,
mt: "11px",
mb: "14px",
}}
>
Название или слоган компании Название или слоган компании
</Typography> </Typography>
<CustomTextField <CustomTextField
@ -490,7 +637,14 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
text={listQuizes[params].config.info.orgname} text={listQuizes[params].config.info.orgname}
onChange={mutationOrgNameHC} onChange={mutationOrgNameHC}
/> />
<Typography sx={{ fontWeight: 500, color: theme.palette.grey3.main, mt: "20px", mb: "14px" }}> <Typography
sx={{
fontWeight: 500,
color: theme.palette.grey3.main,
mt: "20px",
mb: "14px",
}}
>
Сайт Сайт
</Typography> </Typography>
<CustomTextField <CustomTextField
@ -498,7 +652,14 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
text={listQuizes[params].config.info.site} text={listQuizes[params].config.info.site}
onChange={mutationSiteHC} onChange={mutationSiteHC}
/> />
<Typography sx={{ fontWeight: 500, color: theme.palette.grey3.main, mt: "20px", mb: "14px" }}> <Typography
sx={{
fontWeight: 500,
color: theme.palette.grey3.main,
mt: "20px",
mb: "14px",
}}
>
Юридическая информация Юридическая информация
</Typography> </Typography>
<CustomTextField <CustomTextField
@ -524,13 +685,22 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
icon={ icon={
<Button <Button
variant="outlined" variant="outlined"
sx={{ backgroundColor: "transparent", color: theme.palette.brightPurple.main }} sx={{
backgroundColor: "transparent",
color: theme.palette.brightPurple.main,
}}
> >
Отключить стартовую страницу Отключить стартовую страницу
</Button> </Button>
} }
checkedIcon={ checkedIcon={
<Button variant="outlined" sx={{ backgroundColor: theme.palette.brightPurple.main, color: "white" }}> <Button
variant="outlined"
sx={{
backgroundColor: theme.palette.brightPurple.main,
color: "white",
}}
>
Включить стартовую страницу Включить стартовую страницу
</Button> </Button>
} }
@ -561,7 +731,8 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
"https://happypik.ru/wp-content/uploads/2019/09/njashnye-kotiki8.jpg"; "https://happypik.ru/wp-content/uploads/2019/09/njashnye-kotiki8.jpg";
SPageClone.startpage.background.mobile = SPageClone.startpage.background.mobile =
"https://krot.info/uploads/posts/2022-03/1646156155_3-krot-info-p-smeshnie-tolstie-koti-smeshnie-foto-3.png"; "https://krot.info/uploads/posts/2022-03/1646156155_3-krot-info-p-smeshnie-tolstie-koti-smeshnie-foto-3.png";
SPageClone.startpage.background.video = "https://youtu.be/dbaPkCiLPKQ"; SPageClone.startpage.background.video =
"https://youtu.be/dbaPkCiLPKQ";
updateQuizesList(params, { config: SPageClone }); updateQuizesList(params, { config: SPageClone });
handleNext(); handleNext();
createQuestion(params); createQuestion(params);