v1.0.57
This commit is contained in:
parent
eb27f31a30
commit
9a34ef01de
@ -21,7 +21,6 @@ import ViewPublicationPage from "./ViewPublicationPage/ViewPublicationPage";
|
|||||||
import { HelmetProvider } from "react-helmet-async";
|
import { HelmetProvider } from "react-helmet-async";
|
||||||
|
|
||||||
import "moment/dist/locale/ru";
|
import "moment/dist/locale/ru";
|
||||||
import unscreen from "@/ui_kit/unscreen";
|
|
||||||
moment.locale("ru");
|
moment.locale("ru");
|
||||||
const localeText = ruRU.components.MuiLocalizationProvider.defaultProps.localeText;
|
const localeText = ruRU.components.MuiLocalizationProvider.defaultProps.localeText;
|
||||||
|
|
||||||
@ -127,16 +126,6 @@ function QuizAnswererInner({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default function QuizAnswerer(props: Props) {
|
export default function QuizAnswerer(props: Props) {
|
||||||
useEffect(() => {
|
|
||||||
const root = document.getElementById("root");
|
|
||||||
const overlay = document.getElementById("hideoverlay");
|
|
||||||
|
|
||||||
if (root !== null && overlay !== null && props.quizSettings?.settings.cfg?.isUnSc) {
|
|
||||||
overlay.style.cssText =
|
|
||||||
"position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: black; z-index:999; opacity: 0;";
|
|
||||||
unscreen(overlay, root);
|
|
||||||
}
|
|
||||||
}, []);
|
|
||||||
return (
|
return (
|
||||||
<HelmetProvider>
|
<HelmetProvider>
|
||||||
<LocalizationProvider
|
<LocalizationProvider
|
||||||
|
@ -42,7 +42,7 @@ export const Question = ({
|
|||||||
}: Props) => {
|
}: Props) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { settings, show_badge, quizId } = useQuizSettings();
|
const { settings, show_badge, quizId } = useQuizSettings();
|
||||||
console.log(theme);
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
|
@ -18,6 +18,7 @@ import { ResultForm } from "./ResultForm";
|
|||||||
import { StartPageViewPublication } from "./StartPageViewPublication";
|
import { StartPageViewPublication } from "./StartPageViewPublication";
|
||||||
import NextButton from "./tools/NextButton";
|
import NextButton from "./tools/NextButton";
|
||||||
import PrevButton from "./tools/PrevButton";
|
import PrevButton from "./tools/PrevButton";
|
||||||
|
import unscreen from "@/ui_kit/unscreen";
|
||||||
|
|
||||||
export default function ViewPublicationPage() {
|
export default function ViewPublicationPage() {
|
||||||
const { settings, recentlyCompleted, quizId, preview, changeFaviconAndTitle, questions } = useQuizSettings();
|
const { settings, recentlyCompleted, quizId, preview, changeFaviconAndTitle, questions } = useQuizSettings();
|
||||||
@ -38,6 +39,17 @@ export default function ViewPublicationPage() {
|
|||||||
useYandexMetrics(settings?.cfg?.yandexMetricsNumber, preview);
|
useYandexMetrics(settings?.cfg?.yandexMetricsNumber, preview);
|
||||||
useVKMetrics(settings?.cfg?.vkMetricsNumber, preview);
|
useVKMetrics(settings?.cfg?.vkMetricsNumber, preview);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const root = document.getElementById("root");
|
||||||
|
const overlay = document.getElementById("hideoverlay");
|
||||||
|
|
||||||
|
if (root !== null && overlay !== null && settings.cfg?.isUnSc) {
|
||||||
|
overlay.style.cssText =
|
||||||
|
"position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: black; z-index:999; opacity: 0;";
|
||||||
|
unscreen(overlay, root);
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
|
||||||
useEffect(
|
useEffect(
|
||||||
function setFaviconAndTitle() {
|
function setFaviconAndTitle() {
|
||||||
if (!changeFaviconAndTitle) return;
|
if (!changeFaviconAndTitle) return;
|
||||||
|
@ -11,7 +11,7 @@ import { useRootContainerSize } from "@/contexts/RootContainerWidthContext";
|
|||||||
type DateProps = {
|
type DateProps = {
|
||||||
currentQuestion: QuizQuestionDate;
|
currentQuestion: QuizQuestionDate;
|
||||||
};
|
};
|
||||||
console.log(moment.locale());
|
|
||||||
export default ({ currentQuestion }: DateProps) => {
|
export default ({ currentQuestion }: DateProps) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const isMobile = useRootContainerSize() < 690;
|
const isMobile = useRootContainerSize() < 690;
|
||||||
|
@ -32,7 +32,7 @@ const OwnInput = ({ questionId, variant, largeCheck, ownPlaceholder }: OwnInputP
|
|||||||
const { updateOwnVariant } = useQuizViewStore((state) => state);
|
const { updateOwnVariant } = useQuizViewStore((state) => state);
|
||||||
|
|
||||||
const ownAnswer = ownVariants[ownVariants.findIndex((v) => v.id === variant.id)]?.variant.answer || "";
|
const ownAnswer = ownVariants[ownVariants.findIndex((v) => v.id === variant.id)]?.variant.answer || "";
|
||||||
console.log(theme);
|
|
||||||
return largeCheck ? (
|
return largeCheck ? (
|
||||||
<TextareaAutosize
|
<TextareaAutosize
|
||||||
placeholder={ownPlaceholder || "|"}
|
placeholder={ownPlaceholder || "|"}
|
||||||
|
@ -39,6 +39,7 @@ export default function unscreen(overlay: HTMLElement, root: HTMLElement) {
|
|||||||
}); // Когда окно теряет фокус
|
}); // Когда окно теряет фокус
|
||||||
|
|
||||||
window.addEventListener("focus", () => {
|
window.addEventListener("focus", () => {
|
||||||
|
console.log("focus");
|
||||||
isWindowFocused = true;
|
isWindowFocused = true;
|
||||||
checkFocusAndMouse(); // Проверяем состояние
|
checkFocusAndMouse(); // Проверяем состояние
|
||||||
}); // Когда окно получает фокус
|
}); // Когда окно получает фокус
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@frontend/squzanswerer",
|
"name": "@frontend/squzanswerer",
|
||||||
"version": "1.0.56",
|
"version": "1.0.57",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist-package/index.js",
|
"main": "./dist-package/index.js",
|
||||||
"module": "./dist-package/index.js",
|
"module": "./dist-package/index.js",
|
||||||
|
Loading…
Reference in New Issue
Block a user