Merge branch 'dev' into 'staging'
смена текстов See merge request frontend/squiz!376
This commit is contained in:
commit
ca2da99b15
@ -74,6 +74,8 @@ const AnswerItem = memo<AnswerItemProps>(
|
|||||||
setOwnPlaceholder(target.value || " ")
|
setOwnPlaceholder(target.value || " ")
|
||||||
:
|
:
|
||||||
setQuestionVariantField(questionId, variant.id, "answer", target.value || " ");
|
setQuestionVariantField(questionId, variant.id, "answer", target.value || " ");
|
||||||
|
} else {
|
||||||
|
enqueueSnackbar("Превышена длина вводимого текста")
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onKeyDown={(event: KeyboardEvent<HTMLInputElement>) => {
|
onKeyDown={(event: KeyboardEvent<HTMLInputElement>) => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Box, Skeleton, useMediaQuery, useTheme } from "@mui/material";
|
import { Box, Skeleton, Typography, useMediaQuery, useTheme } from "@mui/material";
|
||||||
import { deleteTimeoutedQuestions } from "@utils/deleteTimeoutedQuestions";
|
import { deleteTimeoutedQuestions } from "@utils/deleteTimeoutedQuestions";
|
||||||
import { lazy, Suspense, useCallback } from "react";
|
import { lazy, Suspense, useCallback } from "react";
|
||||||
import { DraggableList } from "../DraggableList";
|
import { DraggableList } from "../DraggableList";
|
||||||
@ -51,6 +51,7 @@ export const QuestionSwitchWindowTool = ({
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
<Typography fontSize="20px" mb="25px">Настройки ветвления вопросов</Typography>
|
||||||
<BranchingMap />
|
<BranchingMap />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
) : (
|
) : (
|
||||||
|
@ -42,6 +42,7 @@ import { DeleteFunction } from "@utils/deleteFunc";
|
|||||||
import { FC, memo, useRef, useState } from "react";
|
import { FC, memo, useRef, useState } from "react";
|
||||||
import type { DraggableProvidedDragHandleProps } from "react-beautiful-dnd";
|
import type { DraggableProvidedDragHandleProps } from "react-beautiful-dnd";
|
||||||
import { ChooseAnswerModal } from "./ChooseAnswerModal";
|
import { ChooseAnswerModal } from "./ChooseAnswerModal";
|
||||||
|
import { enqueueSnackbar } from "notistack";
|
||||||
|
|
||||||
const TextField = MuiTextField as unknown as FC<TextFieldProps>;
|
const TextField = MuiTextField as unknown as FC<TextFieldProps>;
|
||||||
|
|
||||||
@ -124,11 +125,19 @@ const QuestionPageCardTitle = memo<Props>(function ({
|
|||||||
id="questionTitle"
|
id="questionTitle"
|
||||||
value={title}
|
value={title}
|
||||||
placeholder={"Заголовок вопроса"}
|
placeholder={"Заголовок вопроса"}
|
||||||
onChange={({ target }) => setTitle(target.value || " ")}
|
onChange={({ target }) => {
|
||||||
|
console.log(target.value.length)
|
||||||
|
if (target.value.length > maxLengthTextField) {
|
||||||
|
enqueueSnackbar("Превышена длина вводимого текста")
|
||||||
|
} else {
|
||||||
|
setTitle(target.value || " ")
|
||||||
|
}
|
||||||
|
|
||||||
|
}}
|
||||||
onFocus={handleInputFocus}
|
onFocus={handleInputFocus}
|
||||||
onBlur={handleInputBlur}
|
onBlur={handleInputBlur}
|
||||||
inputProps={{
|
inputProps={{
|
||||||
maxLength: maxLengthTextField,
|
// maxLength: maxLengthTextField,
|
||||||
}}
|
}}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
startAdornment: (
|
startAdornment: (
|
||||||
|
@ -15,6 +15,7 @@ import {
|
|||||||
import CloseIcon from "@mui/icons-material/Close";
|
import CloseIcon from "@mui/icons-material/Close";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
import { wrap } from "module";
|
||||||
|
|
||||||
export default function ModalSizeImage() {
|
export default function ModalSizeImage() {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
@ -27,25 +28,45 @@ export default function ModalSizeImage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const rows = [
|
const rows = [
|
||||||
createData("Прямая ссылка/домен", "1792х1509 px"),
|
createData("Стартовая \"Standard\" (десктоп)", "60% х 100%"),
|
||||||
createData("Модальное окно на сайте", "1380х1300 px"),
|
createData("Стартовая \"Standard\" (мобилка)", "100% х 128 px"),
|
||||||
createData("Во ВКонтакте", "1166х1200 px"),
|
createData("Стартовая \"Centered\" (десктоп)", "844х306 px"),
|
||||||
createData("Версия для планшета", "767х220 px"),
|
createData("Стартовая \"Centered\" (планшет гориз.)", "844х530 px"),
|
||||||
createData("Мобильная версия", "400х220 px"),
|
createData("Стартовая \"Centered\" (планшет верт.)", "660х260 px"),
|
||||||
createData("Картинка для дизайна Centered", "900х490 px"),
|
createData("Стартовая \"Centered\" (мобилка)", "100% х 128 px"),
|
||||||
createData("Картинка для дизайна Expanded", "1920х1080 px"),
|
createData("Логотип", "110 х 40 px"),
|
||||||
|
createData("\"Варианты с картинками\" (десктоп)", "317х257 px"),
|
||||||
|
createData("\"Варианты с картинками\" (планшет)", "455х257 px"),
|
||||||
|
createData("\"Варианты с картинками\" (мобилка)", "160х183 px"),
|
||||||
|
createData("\"Варианты и картинка\" (десктоп)", "450х450 px"),
|
||||||
|
createData("\"Варианты и картинка\" (мобилка)", "335х335 px"),
|
||||||
|
createData("\"Своё поле для ввода\" (десктоп)", "450х450 px"),
|
||||||
|
createData("\"Своё поле для ввода\" (мобилка)", "335х335 px"),
|
||||||
|
createData("\"Варианты\" (десктоп)", "450х450 px"),
|
||||||
|
createData("\"Варианты\" (мобилка)", "335х335 px"),
|
||||||
|
createData("Картинка для результата (десктоп)", "700х306 px"),
|
||||||
|
createData("Картинка для результата (мобилка)", "335х236 px"),
|
||||||
];
|
];
|
||||||
|
// const rows = [
|
||||||
|
// createData("Прямая ссылка/домен", "1792х1509 px"),
|
||||||
|
// createData("Модальное окно на сайте", "1380х1300 px"),
|
||||||
|
// createData("Во ВКонтакте", "1166х1200 px"),
|
||||||
|
// createData("Версия для планшета", "767х220 px"),
|
||||||
|
// createData("Мобильная версия", "400х220 px"),
|
||||||
|
// createData("Картинка для дизайна Centered", "900х490 px"),
|
||||||
|
// createData("Картинка для дизайна Expanded", "1920х1080 px"),
|
||||||
|
// ];
|
||||||
|
|
||||||
const rows2 = [
|
// const rows2 = [
|
||||||
createData("Вертикальный вариант", "180х240 px"),
|
// createData("Вертикальный вариант", "180х240 px"),
|
||||||
createData("Квадратные", "240х240 px"),
|
// createData("Квадратные", "240х240 px"),
|
||||||
createData("Варианты и картинка", "380х307 px"),
|
// createData("Варианты и картинка", "380х307 px"),
|
||||||
createData("Консультант", "140х140 px"),
|
// createData("Консультант", "140х140 px"),
|
||||||
createData("Логотип", "107х37 px"),
|
// createData("Логотип", "107х37 px"),
|
||||||
createData("Результаты", "1100х600 px"),
|
// createData("Результаты", "1100х600 px"),
|
||||||
createData("Бонус", "200х60 px"),
|
// createData("Бонус", "200х60 px"),
|
||||||
createData('Картинка для формата вопроса "Страница"', "860х1250 px"),
|
// createData('Картинка для формата вопроса "Страница"', "860х1250 px"),
|
||||||
];
|
// ];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@ -99,6 +120,12 @@ export default function ModalSizeImage() {
|
|||||||
<CloseIcon />
|
<CloseIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Box>
|
</Box>
|
||||||
|
<Box
|
||||||
|
overflow="auto"
|
||||||
|
height="auto"
|
||||||
|
maxHeight="650px"
|
||||||
|
>
|
||||||
|
|
||||||
<Box sx={{ padding: "15px 20px 0px" }}>
|
<Box sx={{ padding: "15px 20px 0px" }}>
|
||||||
<Typography
|
<Typography
|
||||||
variant={"body2"}
|
variant={"body2"}
|
||||||
@ -119,6 +146,7 @@ export default function ModalSizeImage() {
|
|||||||
position: "relative",
|
position: "relative",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
paddingBottom: "5px",
|
paddingBottom: "5px",
|
||||||
|
flexWrap: "wrap"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
@ -157,8 +185,7 @@ export default function ModalSizeImage() {
|
|||||||
</Box>
|
</Box>
|
||||||
))}
|
))}
|
||||||
</Box>
|
</Box>
|
||||||
|
{/* <Box
|
||||||
<Box
|
|
||||||
sx={{
|
sx={{
|
||||||
backgroundColor: theme.palette.background.default,
|
backgroundColor: theme.palette.background.default,
|
||||||
padding: "20px",
|
padding: "20px",
|
||||||
@ -214,7 +241,9 @@ export default function ModalSizeImage() {
|
|||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
))}
|
))}
|
||||||
|
</Box> */}
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
</Box>
|
</Box>
|
||||||
</Modal>
|
</Modal>
|
||||||
</>
|
</>
|
||||||
|
@ -64,7 +64,8 @@ export default function Extra() {
|
|||||||
Дополнительно
|
Дополнительно
|
||||||
</Link>
|
</Link>
|
||||||
</Box>
|
</Box>
|
||||||
{isExpanded && quiz && (
|
|
||||||
|
{/* {isExpanded && quiz && (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
backgroundColor: "transparent",
|
backgroundColor: "transparent",
|
||||||
@ -89,7 +90,7 @@ export default function Extra() {
|
|||||||
onChange={mutationOrgMetaHC}
|
onChange={mutationOrgMetaHC}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)} */}
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@ -9,6 +9,7 @@ import {
|
|||||||
Typography,
|
Typography,
|
||||||
useTheme,
|
useTheme,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
|
import { enqueueSnackbar } from "notistack";
|
||||||
|
|
||||||
interface CustomTextFieldProps {
|
interface CustomTextFieldProps {
|
||||||
placeholder: string;
|
placeholder: string;
|
||||||
@ -71,6 +72,8 @@ export default function CustomTextField({
|
|||||||
if (onChange) {
|
if (onChange) {
|
||||||
onChange(event);
|
onChange(event);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
enqueueSnackbar("Превышена длина вводимого текста")
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user