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 ?