Merge branch 'dev' into 'staging'

Dev

See merge request frontend/squzanswerer!140
This commit is contained in:
Nastya 2024-05-06 11:39:58 +00:00
commit b95fe54d9a

@ -8,18 +8,18 @@ import {
useTheme,
} from "@mui/material";
import { QuizPreviewLayoutByType } from "./QuizPreviewLayoutByType";
import {QuizPreviewLayoutByType} from "./QuizPreviewLayoutByType";
import YoutubeEmbedIframe from "../tools/YoutubeEmbedIframe";
import { useQuizData } from "@contexts/QuizDataContext";
import { useRootContainerSize } from "@contexts/RootContainerWidthContext";
import {useQuizData} from "@contexts/QuizDataContext";
import {useRootContainerSize} from "@contexts/RootContainerWidthContext";
import { useUADevice } from "@utils/hooks/useUADevice";
import { quizThemes } from "@utils/themes/Publication/themePublication";
import {useUADevice} from "@utils/hooks/useUADevice";
import {quizThemes} from "@utils/themes/Publication/themePublication";
import { NameplateLogo } from "@icons/NameplateLogo";
import { useQuizViewStore } from "@/stores/quizView";
import { DESIGN_LIST } from "@/utils/designList";
import {NameplateLogo} from "@icons/NameplateLogo";
import {useQuizViewStore} from "@/stores/quizView";
import {DESIGN_LIST} from "@/utils/designList";
export const StartPageViewPublication = () => {
const theme = useTheme();
@ -34,23 +34,23 @@ export const StartPageViewPublication = () => {
const handleCopyNumber = () => {
navigator.clipboard.writeText(settings.cfg.info.phonenumber);
//@ts-ignore
let YM = window?.ym;
const YM = window?.ym;
//@ts-ignore
let VP = window?._tmr;
const VP = window?._tmr;
if (YM !== undefined && settings.cfg.yandexMetricNumber !== undefined) {
YM(
settings.cfg.yandexMetricNumber,
"reachGoal",
"penaquiz-phone"
);
};
}
if (VP !== undefined && settings.cfg.vkMetricNumber !== undefined) {
VP.push({
type: "reachGoal",
id: settings.cfg.vkMetricNumber,
goal: "penaquiz-phone"
});
};
}
};
const background =
@ -292,23 +292,23 @@ export const StartPageViewPublication = () => {
//@ts-ignore
let YM = window?.ym;
const YM = window?.ym;
//@ts-ignore
let VP = window?._tmr;
const VP = window?._tmr;
if (YM !== undefined && settings.cfg.yandexMetricNumber !== undefined) {
YM(
settings.cfg.yandexMetricNumber,
"reachGoal",
"penaquiz-startquiz"
);
};
}
if (VP !== undefined && settings.cfg.vkMetricNumber !== undefined) {
VP.push({
type: "reachGoal",
id: settings.cfg.vkMetricNumber,
goal: "penaquiz-startquiz"
});
};
}
}}
>
{settings.cfg.startpage.button.trim()
@ -344,25 +344,26 @@ export const StartPageViewPublication = () => {
}}>
{settings.cfg.info.site && (
<ButtonBase
sx={{ display:"block",marginLeft: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && !isMobile ? "auto" : undefined,}}
onClick={async () => {
//@ts-ignore
let YM = window?.ym;
const YM = window?.ym;
//@ts-ignore
let VP = window?._tmr;
const VP = window?._tmr;
if (YM !== undefined && settings.cfg.yandexMetricNumber !== undefined) {
await YM(
settings.cfg.yandexMetricNumber,
"reachGoal",
"penaquiz-email"
);
};
}
if (VP !== undefined && settings.cfg.vkMetricNumber !== undefined) {
await VP.push({
type: "reachGoal",
id: settings.cfg.vkMetricNumber,
goal: "penaquiz-email"
});
};
}
location.href = (
settings.cfg.info.site.includes("https")
? settings.cfg.info.site
@ -404,7 +405,10 @@ export const StartPageViewPublication = () => {
</Typography>
</Link>
) : (
<ButtonBase onClick={handleCopyNumber}>
<ButtonBase sx={{ display:"block", marginTop:"10px",
marginLeft: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && !isMobile ? "auto" : undefined,
}}
onClick={handleCopyNumber} >
<Typography
sx={{
textAlign: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" ? "end" : "none",
@ -442,7 +446,7 @@ export const StartPageViewPublication = () => {
width: "100%",
overflowWrap: "break-word",
fontSize: "12px",
textAlign: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" ? "end" : "none",
textAlign: settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && !isMobile ? "end" : settings.cfg.startpageType === "expanded" && settings.cfg.startpage.position === "center" && isMobile || settings.cfg.startpageType === "centered" && isMobile ? "center" : "none",
maxHeight: "120px",
overflow: "auto",
marginTop: "10px",