Merge branch 'staging' into 'main'
Staging See merge request frontend/squiz!387
This commit is contained in:
commit
5144d1eabe
@ -9,7 +9,7 @@ RUN npm config set -- //penahub.gitlab.yandexcloud.net/api/v4/projects/43/packag
|
|||||||
RUN npm config set @frontend:registry https://penahub.gitlab.yandexcloud.net/api/v4/packages/npm/
|
RUN npm config set @frontend:registry https://penahub.gitlab.yandexcloud.net/api/v4/packages/npm/
|
||||||
RUN yarn config set '//penahub.gitlab.yandexcloud.net/api/v4/packages/npm/:_authToken' "glpat-JL_7wSM1QpW7xGfd-oWX"
|
RUN yarn config set '//penahub.gitlab.yandexcloud.net/api/v4/packages/npm/:_authToken' "glpat-JL_7wSM1QpW7xGfd-oWX"
|
||||||
RUN yarn config set '//penahub.gitlab.yandexcloud.net/api/v4/projects/:_authToken' "glpat-JL_7wSM1QpW7xGfd-oWX"
|
RUN yarn config set '//penahub.gitlab.yandexcloud.net/api/v4/projects/:_authToken' "glpat-JL_7wSM1QpW7xGfd-oWX"
|
||||||
RUN yarn install --ignore-scripts --non-interactive --frozen-lockfile && yarn cache clean
|
RUN yarn install --ignore-scripts --non-interactive && yarn cache clean
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
"@craco/craco": "^7.0.0",
|
"@craco/craco": "^7.0.0",
|
||||||
"@emotion/react": "^11.10.5",
|
"@emotion/react": "^11.10.5",
|
||||||
"@emotion/styled": "^11.10.5",
|
"@emotion/styled": "^11.10.5",
|
||||||
"@frontend/kitui": "^1.0.85",
|
"@frontend/kitui": "^1.0.86",
|
||||||
"@frontend/squzanswerer": "^1.0.56",
|
"@frontend/squzanswerer": "^1.0.57",
|
||||||
"@mui/icons-material": "^5.10.14",
|
"@mui/icons-material": "^5.10.14",
|
||||||
"@mui/material": "^5.10.14",
|
"@mui/material": "^5.10.14",
|
||||||
"@mui/x-charts": "^6.19.5",
|
"@mui/x-charts": "^6.19.5",
|
||||||
|
|||||||
@ -4,9 +4,10 @@ import RunningStripe from "@ui_kit/RunningStripe";
|
|||||||
interface Props {
|
interface Props {
|
||||||
position: "left" | "right";
|
position: "left" | "right";
|
||||||
buttonFlash: boolean;
|
buttonFlash: boolean;
|
||||||
|
text: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function SideWidgetPreviewDesktop({ buttonFlash, position }: Props) {
|
export default function SideWidgetPreviewDesktop({ buttonFlash, position, text }: Props) {
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
sx={[
|
sx={[
|
||||||
@ -46,7 +47,7 @@ export default function SideWidgetPreviewDesktop({ buttonFlash, position }: Prop
|
|||||||
fontSize="40cqh"
|
fontSize="40cqh"
|
||||||
color="white"
|
color="white"
|
||||||
>
|
>
|
||||||
Пройти квиз
|
{ text || "Пройти квиз" }
|
||||||
</Typography>
|
</Typography>
|
||||||
{buttonFlash && <RunningStripe />}
|
{buttonFlash && <RunningStripe />}
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import { useWidgetUrl } from "../../useWidgetUrl";
|
|||||||
import SideWidgetPositionButton from "./SideWidgetPositionButton";
|
import SideWidgetPositionButton from "./SideWidgetPositionButton";
|
||||||
import SideWidgetPreviewDesktop from "./SideWidgetPreviewDesktop";
|
import SideWidgetPreviewDesktop from "./SideWidgetPreviewDesktop";
|
||||||
import SideWidgetPreviewMobile from "./SideWidgetPreviewMobile";
|
import SideWidgetPreviewMobile from "./SideWidgetPreviewMobile";
|
||||||
|
import CustomTextField from "@ui_kit/CustomTextField";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
step: 2 | 3;
|
step: 2 | 3;
|
||||||
@ -30,6 +31,7 @@ export default function SideWidgetSetup({ step, nextButton }: Props) {
|
|||||||
const [autoShowQuizTime, setAutoShowQuizTime] = useState<number>(10);
|
const [autoShowQuizTime, setAutoShowQuizTime] = useState<number>(10);
|
||||||
const [autoShowWidgetTime, setAutoShowWidgetTime] = useState<number>(10);
|
const [autoShowWidgetTime, setAutoShowWidgetTime] = useState<number>(10);
|
||||||
const [position, setPosition] = useState<SideWidgetParams["position"]>("left");
|
const [position, setPosition] = useState<SideWidgetParams["position"]>("left");
|
||||||
|
const [buttonText, setButtonText] = useState<string>("Пройти квиз");
|
||||||
const [fullScreen, setFullScreen] = useState<boolean>(false);
|
const [fullScreen, setFullScreen] = useState<boolean>(false);
|
||||||
const [buttonFlash, setButtonFlash] = useState<boolean>(false);
|
const [buttonFlash, setButtonFlash] = useState<boolean>(false);
|
||||||
const [buttonBackgroundColor, setButtonBackgroundColor] = useState<string>(theme.palette.brightPurple.main);
|
const [buttonBackgroundColor, setButtonBackgroundColor] = useState<string>(theme.palette.brightPurple.main);
|
||||||
@ -48,13 +50,14 @@ export default function SideWidgetSetup({ step, nextButton }: Props) {
|
|||||||
fullScreen: fullScreen || undefined,
|
fullScreen: fullScreen || undefined,
|
||||||
buttonFlash: buttonFlash || undefined,
|
buttonFlash: buttonFlash || undefined,
|
||||||
buttonTextColor,
|
buttonTextColor,
|
||||||
|
buttonText: buttonText,
|
||||||
buttonBackgroundColor,
|
buttonBackgroundColor,
|
||||||
dialogDimensions:
|
dialogDimensions:
|
||||||
!fullScreen && (widgetWidth || widgetHeight)
|
!fullScreen && (widgetWidth || widgetHeight)
|
||||||
? {
|
? {
|
||||||
width: widgetWidth ? `${widgetWidth}px` : "100%",
|
width: widgetWidth ? `${widgetWidth}px` : "100%",
|
||||||
height: widgetHeight ? `${widgetHeight}px` : "100%",
|
height: widgetHeight ? `${widgetHeight}px` : "100%",
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
},
|
},
|
||||||
widgetUrl
|
widgetUrl
|
||||||
@ -100,6 +103,7 @@ export default function SideWidgetSetup({ step, nextButton }: Props) {
|
|||||||
<SideWidgetPreviewDesktop
|
<SideWidgetPreviewDesktop
|
||||||
position={position}
|
position={position}
|
||||||
buttonFlash={buttonFlash}
|
buttonFlash={buttonFlash}
|
||||||
|
text={buttonText}
|
||||||
/>
|
/>
|
||||||
<SideWidgetPreviewMobile buttonFlash={buttonFlash} />
|
<SideWidgetPreviewMobile buttonFlash={buttonFlash} />
|
||||||
</Box>
|
</Box>
|
||||||
@ -274,10 +278,20 @@ export default function SideWidgetSetup({ step, nextButton }: Props) {
|
|||||||
</Typography>
|
</Typography>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
</Box>
|
</Box>
|
||||||
<CustomCheckbox
|
<Typography sx={{ color: theme.palette.grey2.main }}>Текст кнопки</Typography>
|
||||||
label="Отключить на мобильных устройствах"
|
<CustomTextField
|
||||||
checked={hideOnMobile}
|
id="headingInput"
|
||||||
handleChange={(e) => setHideOnMobile(e.target.checked)}
|
onChange={(e) => setButtonText(e.target.value)}
|
||||||
|
placeholder="Пройти тест"
|
||||||
|
value={buttonText}
|
||||||
|
sx={{
|
||||||
|
borderColor: theme.palette.brightPurple.main,
|
||||||
|
}}
|
||||||
|
sxForm={{
|
||||||
|
maxWidth: "360px",
|
||||||
|
|
||||||
|
}}
|
||||||
|
maxLength={17}
|
||||||
/>
|
/>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
|
|||||||
@ -854,6 +854,24 @@ export default function StartPageSettings() {
|
|||||||
Включить антифрод
|
Включить антифрод
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
<Box sx={{ display: "flex", gap: "20px", alignItems: "center", mt: "20px" }}>
|
||||||
|
<CustomizedSwitch
|
||||||
|
checked={quiz.config?.isUnSc}
|
||||||
|
onChange={(e) => {
|
||||||
|
updateQuiz(quiz.id, (quiz) => {
|
||||||
|
quiz.config.isUnSc = e.target.checked;
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Typography
|
||||||
|
sx={{
|
||||||
|
fontWeight: 500,
|
||||||
|
color: theme.palette.grey3.main,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Включить защиту от копирования
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user