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