diff --git a/src/index.css b/src/index.css index 6f14e2b..07fdd42 100755 --- a/src/index.css +++ b/src/index.css @@ -6,6 +6,14 @@ body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } +/*скрывает все скролл-бары*/ +body * { + -ms-overflow-style: none; + scrollbar-width: none; +} +body * ::-webkit-scrollbar { + display: none; +} code { font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', diff --git a/src/pages/ViewPublicationPage/ContactForm.tsx b/src/pages/ViewPublicationPage/ContactForm.tsx index 97c6311..81e2825 100644 --- a/src/pages/ViewPublicationPage/ContactForm.tsx +++ b/src/pages/ViewPublicationPage/ContactForm.tsx @@ -135,6 +135,9 @@ export const ContactForm = ({ backgroundColor: theme.palette.background.default, height: "100vh", overflow: "auto", + "&::-webkit-scrollbar": { width: "0", display: "none", msOverflowStyle: "none" }, + scrollbarWidth: "none", + msOverflowStyle: "none" }} > q.content.rule.parentId === "line")); } return; diff --git a/src/pages/ViewPublicationPage/ResultForm.tsx b/src/pages/ViewPublicationPage/ResultForm.tsx index 3ec5859..e5de906 100644 --- a/src/pages/ViewPublicationPage/ResultForm.tsx +++ b/src/pages/ViewPublicationPage/ResultForm.tsx @@ -67,7 +67,7 @@ export const ResultForm = ({ flexDirection: "column", alignItems: "center", justifyContent: "space-between", - height: isMobile ? undefined : "100vh", + height: "100vh", width: "100vw", pt: "28px", overflow: "auto" diff --git a/src/pages/ViewPublicationPage/index.tsx b/src/pages/ViewPublicationPage/index.tsx index 37260fd..14e461b 100644 --- a/src/pages/ViewPublicationPage/index.tsx +++ b/src/pages/ViewPublicationPage/index.tsx @@ -18,7 +18,7 @@ const QID = process.env.NODE_ENV === "production" ? window.location.pathname.replace(/\//g, '') : - "2363ad2c-0c19-4f51-80c0-ed2242daa0c4" + "9fafc6c9-6ccf-42b6-b400-0ee9f5f0fa16" export const ViewPage = () => { diff --git a/src/pages/ViewPublicationPage/questions/Date.tsx b/src/pages/ViewPublicationPage/questions/Date.tsx index d4574f1..e7bad5e 100644 --- a/src/pages/ViewPublicationPage/questions/Date.tsx +++ b/src/pages/ViewPublicationPage/questions/Date.tsx @@ -9,7 +9,7 @@ import type { QuizQuestionDate } from "../../../model/questionTypes/date"; import CalendarIcon from "@icons/CalendarIcon"; import { enqueueSnackbar } from "notistack"; import { sendAnswer } from "@api/quizRelase"; -import { useQuestionsStore } from "@root/quizData/store" +import { useQuestionsStore } from "@root/quizData/store"; type DateProps = { currentQuestion: QuizQuestionDate; @@ -19,7 +19,7 @@ export const Date = ({ currentQuestion }: DateProps) => { const theme = useTheme(); const mode = modes; - const { settings } = useQuestionsStore() + const { settings } = useQuestionsStore(); const { answers } = useQuizViewStore(); const answer = answers.find( ({ questionId }) => questionId === currentQuestion.id @@ -28,7 +28,9 @@ export const Date = ({ currentQuestion }: DateProps) => { return ( - {currentQuestion.title} + + {currentQuestion.title} + { , + openPickerIcon: () => ( + + ), }} value={dayjs( - answer + month && day && year ? new window.Date(`${month}.${day}.${year}`) : new window.Date() )} @@ -54,19 +60,22 @@ export const Date = ({ currentQuestion }: DateProps) => { if (!date) { return; } - + try { await sendAnswer({ questionId: currentQuestion.id, - body: new window.Date(date.toDate()).toLocaleDateString("ru-RU", { - year: "numeric", - month: "2-digit", - day: "2-digit", - }), + body: new window.Date(date.toDate()).toLocaleDateString( + "ru-RU", + { + year: "numeric", + month: "2-digit", + day: "2-digit", + } + ), //@ts-ignore - qid: settings.qid - }) - + qid: settings.qid, + }); + updateAnswer( currentQuestion.id, String( @@ -78,9 +87,8 @@ export const Date = ({ currentQuestion }: DateProps) => { ) ); } catch (e) { - enqueueSnackbar("ответ не был засчитан") + enqueueSnackbar("ответ не был засчитан"); } - }} slotProps={{ openPickerButton: { @@ -89,14 +97,15 @@ export const Date = ({ currentQuestion }: DateProps) => { }, "data-cy": "open-datepicker", }, - layout: { - sx: {backgroundColor: theme.palette.background.default,} - } + layout: { + sx: { backgroundColor: theme.palette.background.default }, + }, }} sx={{ - "& .MuiInputBase-root": { - backgroundColor: mode[settings.cfg.theme] ? "white" : theme.palette.background.default, + backgroundColor: mode[settings.cfg.theme] + ? "white" + : theme.palette.background.default, borderRadius: "10px", maxWidth: "250px", pr: "22px", @@ -109,11 +118,9 @@ export const Date = ({ currentQuestion }: DateProps) => { borderColor: "#9A9AAF", }, }, - }} /> ); - -}; \ No newline at end of file +}; diff --git a/src/pages/ViewPublicationPage/tools/Select.tsx b/src/pages/ViewPublicationPage/tools/Select.tsx index d773f0f..62be219 100644 --- a/src/pages/ViewPublicationPage/tools/Select.tsx +++ b/src/pages/ViewPublicationPage/tools/Select.tsx @@ -112,10 +112,14 @@ export const Select = ({ inputProps={{ sx: { color: colorMain, - display: "flex", - alignItems: "center", + display: "block", px: "9px", gap: "20px", + "& .MuiTypography-root": { + overflow: "hidden", + textOverflow: "ellipsis", + } + }, }} IconComponent={(props) => } @@ -131,6 +135,7 @@ export const Select = ({ padding: "10px", borderRadius: "5px", color: colorPlaceholder, + whiteSpace: "normal" }} > {item}