diff --git a/src/pages/DesignPage/DesignPage.tsx b/src/pages/DesignPage/DesignPage.tsx
index 94a2c716..d1cdf236 100644
--- a/src/pages/DesignPage/DesignPage.tsx
+++ b/src/pages/DesignPage/DesignPage.tsx
@@ -3,7 +3,7 @@ import { Box, useMediaQuery, useTheme, Skeleton } from "@mui/material";
import { setQuizes, setCurrentStep } from "@root/quizes/actions";
import { useCurrentQuiz } from "@root/quizes/hooks";
import { useQuizStore } from "@root/quizes/store";
-import Sidebar from "@ui_kit/Sidebar";
+import Sidebar from "@ui_kit/Sidebar/Sidebar";
import { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
import { SidebarMobile } from "../../ui_kit/Sidebar/SidebarMobile";
diff --git a/src/pages/Questions/BranchingMap/hooks/usePopper.ts b/src/pages/Questions/BranchingMap/hooks/usePopper.ts
index 4f69a6ee..cd9fa3e4 100644
--- a/src/pages/Questions/BranchingMap/hooks/usePopper.ts
+++ b/src/pages/Questions/BranchingMap/hooks/usePopper.ts
@@ -135,6 +135,11 @@ export const usePopper = ({
setModalQuestionParentContentId(item.id());
setOpenedModalQuestions(true);
});
+ layoutElement.addEventListener("ontouchend", () => {
+ //Узнаём грани, идущие от этой ноды
+ setModalQuestionParentContentId(item.id());
+ setOpenedModalQuestions(true);
+ });
layoutsContainer.current?.appendChild(layoutElement);
return layoutElement;
@@ -162,6 +167,9 @@ export const usePopper = ({
plusElement.addEventListener("mouseup", () => {
setStartCreate(node.id());
});
+ plusElement.addEventListener("ontouchend", () => {
+ setStartCreate(node.id());
+ });
plusesContainer.current?.appendChild(plusElement);
@@ -191,6 +199,9 @@ export const usePopper = ({
crossElement.addEventListener("mouseup", () => {
setStartRemove(node.id());
});
+ crossElement.addEventListener("ontouchend", () => {
+ setStartRemove(node.id());
+ });
return crossElement;
},
@@ -225,6 +236,9 @@ export const usePopper = ({
gearElement.addEventListener("mouseup", () => {
updateOpenedModalSettingsId(item.id());
});
+ gearElement.addEventListener("ontouchend", () => {
+ updateOpenedModalSettingsId(item.id());
+ });
console.log("собираюсь анализировать папашу");
console.log("Тип папаши ", parentQuestion.type);
diff --git a/src/pages/Questions/OwnTextField/OwnTextField.tsx b/src/pages/Questions/OwnTextField/OwnTextField.tsx
index 45b0be6f..cf3c2b18 100644
--- a/src/pages/Questions/OwnTextField/OwnTextField.tsx
+++ b/src/pages/Questions/OwnTextField/OwnTextField.tsx
@@ -13,6 +13,7 @@ import InfoIcon from "../../../assets/icons/InfoIcon";
import type { QuizQuestionText } from "../../../model/questionTypes/text";
import ButtonsOptions from "../ButtonsOptions";
import SwitchTextField from "./switchTextField";
+import TooltipClickInfo from "@ui_kit/Toolbars/TooltipClickInfo";
interface Props {
question: QuizQuestionText;
@@ -77,14 +78,20 @@ export default function OwnTextField({ question }: Props) {
>
Пользователю будет дано поле для ввода значения
-
-
-
-
-
+ {isMobile ? (
+
+ ) : (
+
+
+
+
+
+ )}
diff --git a/src/pages/ViewPublicationPage/StartPageViewPublication.tsx b/src/pages/ViewPublicationPage/StartPageViewPublication.tsx
index 1cbbdac9..1f48c65c 100644
--- a/src/pages/ViewPublicationPage/StartPageViewPublication.tsx
+++ b/src/pages/ViewPublicationPage/StartPageViewPublication.tsx
@@ -84,6 +84,8 @@ export const StartPageViewPublication = ({ setVisualStartPage }: Props) => {
) : null
) : null;
+ console.log(background)
+
return (
+{quiz.config.startpage.background.type === "image" &&
-
-
- updateQuiz(quiz.id, (quiz) => {
- quiz.config.startpage.background.video = e.target.value;
- })
- }
- />
-
+}
+{quiz.config.startpage.background.type === "video" && <>
+
+
+ Добавить видео
+
+
+
+
+
+
+
+
+ {
+ const file = event.target.files?.[0];
+ if (file) {
+ uploadQuizImage(quiz.id, file, (quiz, url) => {
+ quiz.config.startpage.background.video = url;
+ });
+ // setVideo(URL.createObjectURL(file));
+ }
+
+ }}
+ hidden
+ accept=".mp4"
+ multiple
+ type="file"
+ />
+ }
+ sx={{
+ height: "48px",
+ width: "48px",
+ }}
+ />
+
+ {quiz.config.startpage.background.video ? : null}
+
+
+>}
{designType !== "centered" && (
<>
= ({ open, changePage }) => {
const [inputOpen, setInputOpen] = useState(false);
const quiz = useCurrentQuiz();
const ref = useRef(null);
-
+ const navigate = useNavigate();
const handleClick = (event) => {
setAnchorEl(anchorEl ? null : event.currentTarget);
};
+ async function handleLogoutClick() {
+ const [, logoutError] = await logout();
+
+ if (logoutError) {
+ return enqueueSnackbar(logoutError);
+ }
+
+ clearAuthToken();
+ clearUserData();
+ navigate("/");
+ }
const clickInput = (event) => {
if (ref.current && !ref.current.contains(event.target)) setInputOpen(false);
@@ -149,7 +166,7 @@ export const SidebarMobile: FC = ({ open, changePage }) => {
= ({ open, changePage }) => {
{/* {sidebarIcon}*/}
{/* */}
{/*))}*/}
+
+
+
+
+
+
-
+ {/*
+ /> */}
);
}
diff --git a/src/ui_kit/Toolbars/ToTariffsButton.tsx b/src/ui_kit/Toolbars/ToTariffsButton.tsx
index 5d3e175f..ea5c02ea 100644
--- a/src/ui_kit/Toolbars/ToTariffsButton.tsx
+++ b/src/ui_kit/Toolbars/ToTariffsButton.tsx
@@ -1,10 +1,10 @@
import { Button } from "@mui/material";
import { Link } from "react-router-dom";
-export const ToTariffsButton = () => {
+export const ToTariffsButton = (color?: string) => {
return (
-
+
);
};
diff --git a/src/ui_kit/Toolbars/TooltipClickInfo.tsx b/src/ui_kit/Toolbars/TooltipClickInfo.tsx
new file mode 100644
index 00000000..86a3e5ea
--- /dev/null
+++ b/src/ui_kit/Toolbars/TooltipClickInfo.tsx
@@ -0,0 +1,38 @@
+import { Button, ClickAwayListener, IconButton, Tooltip } from "@mui/material";
+import InfoIcon from "@icons/InfoIcon";
+import { useState } from "react";
+
+export default function TooltipClickInfo({ title }: string) {
+ const [open, setOpen] = useState(false);
+
+ const handleTooltipClose = () => {
+ setOpen(false);
+ };
+
+ const handleTooltipOpen = () => {
+ setOpen(true);
+ };
+ return (
+ <>
+
+
+
+
+
+
+
+
+
+ >
+ );
+}