Merge branch 'main' into dev
This commit is contained in:
commit
32e153518c
@ -1 +1 @@
|
||||
REACT_APP_DOMAIN=""
|
||||
REACT_APP_DOMAIN="https://quiz.pena.digital"
|
||||
|
@ -4,11 +4,6 @@ RUN apk update && rm -rf /var/cache/apk/*
|
||||
WORKDIR /usr/app
|
||||
COPY . .
|
||||
|
||||
RUN npm config set -- //penahub.gitlab.yandexcloud.net/api/v4/packages/npm/:_authToken=glpat-JL_7wSM1QpW7xGfd-oWX
|
||||
RUN npm config set -- //penahub.gitlab.yandexcloud.net/api/v4/projects/43/packages/npm/:_authToken=glpat-JL_7wSM1QpW7xGfd-oWX
|
||||
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/projects/:_authToken' "glpat-JL_7wSM1QpW7xGfd-oWX"
|
||||
RUN yarn install --ignore-scripts --non-interactive && yarn cache clean
|
||||
RUN yarn build
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
"@emotion/react": "^11.10.5",
|
||||
"@emotion/styled": "^11.10.5",
|
||||
"@frontend/kitui": "^1.0.87",
|
||||
"@frontend/squzanswerer": "^1.0.57",
|
||||
"@frontend/squzanswerer": "^1.0.61",
|
||||
"@mui/icons-material": "^5.10.14",
|
||||
"@mui/material": "^5.10.14",
|
||||
"@mui/x-charts": "^6.19.5",
|
||||
|
@ -99,7 +99,10 @@ export const DesignFilling = ({
|
||||
const theme = useTheme();
|
||||
const isMobile = useMediaQuery(theme.breakpoints.down(830));
|
||||
const heightBar = heightSidebar + 51 + 88 + 36;
|
||||
|
||||
|
||||
const CONST_QUIZ_THEME = quiz?.config.theme !== undefined && quiz?.config.theme === "crutch_FurnitureABC" ? "" : quiz?.config.theme || "";
|
||||
console.log("CONST_QUIZ_THEME")
|
||||
console.log(CONST_QUIZ_THEME)
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
@ -144,7 +147,7 @@ export const DesignFilling = ({
|
||||
<Box sx={{ display: "flex", gap: "20px", flexWrap: "wrap" }}>
|
||||
<DesignGroup
|
||||
title="Со светлым фоном"
|
||||
value={quiz?.config.design ? "" : quiz?.config.theme || ""}
|
||||
value={CONST_QUIZ_THEME ? "" : quiz?.config.theme || ""}
|
||||
list={LIGHT_THEME_BUTTONS}
|
||||
onChange={(name) =>
|
||||
updateQuiz(quiz?.id, (quiz) => {
|
||||
@ -155,7 +158,7 @@ export const DesignFilling = ({
|
||||
/>
|
||||
<DesignGroup
|
||||
title="С тёмным фоном"
|
||||
value={quiz?.config.design ? "" : quiz?.config.theme || ""}
|
||||
value={CONST_QUIZ_THEME ? "" : quiz?.config.theme || ""}
|
||||
list={DARK_THEME_BUTTONS}
|
||||
onChange={(name) =>
|
||||
updateQuiz(quiz?.id, (quiz) => {
|
||||
|
@ -55,8 +55,9 @@ export default function QuizPreview() {
|
||||
[isPreviewShown]
|
||||
);
|
||||
|
||||
const CONST_QUIZ_THEME = quiz?.config.theme !== undefined && quiz?.config.theme === "crutch_FurnitureABC" ? "" : quiz?.config.theme || "";
|
||||
return (
|
||||
<ThemeProvider theme={themesPublication?.[quiz?.config.theme || "StandardTheme"]}>
|
||||
<ThemeProvider theme={themesPublication?.[CONST_QUIZ_THEME || "StandardTheme"]}>
|
||||
<Box
|
||||
ref={rndParentRef}
|
||||
data-cy="quiz-preview-container"
|
||||
|
@ -29,6 +29,7 @@ export default function QuizPreviewLayout() {
|
||||
navigator.clipboard.writeText(quiz.config.info.phonenumber);
|
||||
};
|
||||
|
||||
const CONST_QUIZ_THEME = quiz?.config.theme !== undefined && quiz?.config.theme === "crutch_FurnitureABC" ? "" : quiz?.config.theme || "";
|
||||
const background =
|
||||
quiz.config.startpage.background.type === "image" ? (
|
||||
quiz.config.startpage.background.desktop ? (
|
||||
@ -219,7 +220,7 @@ export default function QuizPreviewLayout() {
|
||||
color:
|
||||
quiz.config.startpageType === "expanded"
|
||||
? "#FFFFFF"
|
||||
: mode[quiz?.config.theme || "StandardTheme"]
|
||||
: mode[CONST_QUIZ_THEME || "StandardTheme"]
|
||||
? "#151515"
|
||||
: "#FFFFFF",
|
||||
}}
|
||||
@ -230,7 +231,7 @@ export default function QuizPreviewLayout() {
|
||||
color:
|
||||
quiz.config.startpageType === "expanded"
|
||||
? "#F5F7FF"
|
||||
: mode[quiz?.config.theme || "StandardTheme"]
|
||||
: mode[CONST_QUIZ_THEME || "StandardTheme"]
|
||||
? "#4D4D4D"
|
||||
: "#F5F7FF",
|
||||
whiteSpace: "nowrap",
|
||||
|
@ -66,9 +66,10 @@ export const StartPagePreview = () => {
|
||||
[isPreviewShown],
|
||||
);
|
||||
|
||||
const CONST_QUIZ_THEME = quiz?.config.theme !== undefined && quiz?.config.theme === "crutch_FurnitureABC" ? "" : quiz?.config.theme || "";
|
||||
return (
|
||||
<ThemeProvider
|
||||
theme={themesPublication?.[quiz?.config.theme || "StandardTheme"]}
|
||||
theme={themesPublication?.[CONST_QUIZ_THEME || "StandardTheme"]}
|
||||
>
|
||||
<Box
|
||||
ref={rndParentRef}
|
||||
|
@ -38,7 +38,8 @@ export const parseAxiosError = (nativeError: unknown): [string, number?] => {
|
||||
const serverError = error.response.data as ServerError;
|
||||
let SEMessage;
|
||||
|
||||
if(error.response.status === 409) {
|
||||
const status = error.response.status;
|
||||
if(status === 409 || status === 401 || status === 404) {
|
||||
const serverErrorMessage = error.response.data.message
|
||||
const translatedMessage = translateMessage[serverErrorMessage.toLowerCase() || ""]
|
||||
return [translatedMessage || "", serverError.statusCode];
|
||||
|
16
yarn.lock
16
yarn.lock
@ -1513,18 +1513,18 @@
|
||||
resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.2.tgz#d8bae93ac8b815b2bd7a98078cf91e2724ef11e5"
|
||||
integrity sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==
|
||||
|
||||
"@frontend/kitui@^1.0.85":
|
||||
version "1.0.85"
|
||||
resolved "https://penahub.gitlab.yandexcloud.net/api/v4/projects/21/packages/npm/@frontend/kitui/-/@frontend/kitui-1.0.85.tgz#1a384c9ff3314175c1ba3d35d0979da7026a21ab"
|
||||
integrity sha1-GjhMn/MxQXXBuj010JedpwJqIas=
|
||||
"@frontend/kitui@^1.0.86":
|
||||
version "1.0.86"
|
||||
resolved "https://penahub.gitlab.yandexcloud.net/api/v4/projects/21/packages/npm/@frontend/kitui/-/@frontend/kitui-1.0.86.tgz#03a56b99403b62810134f3d7da01ea3fc8cc4f7f"
|
||||
integrity sha1-A6VrmUA7YoEBNPPX2gHqP8jMT38=
|
||||
dependencies:
|
||||
immer "^10.0.2"
|
||||
reconnecting-eventsource "^1.6.2"
|
||||
|
||||
"@frontend/squzanswerer@^1.0.56":
|
||||
version "1.0.56"
|
||||
resolved "https://penahub.gitlab.yandexcloud.net/api/v4/projects/43/packages/npm/@frontend/squzanswerer/-/@frontend/squzanswerer-1.0.56.tgz#0372cda2bdfdf9f84c5854944d2817cffc1f0fd7"
|
||||
integrity sha1-A3LNor39+fhMWFSUTSgXz/wfD9c=
|
||||
"@frontend/squzanswerer@^1.0.61":
|
||||
version "1.0.61"
|
||||
resolved "https://penahub.gitlab.yandexcloud.net/api/v4/projects/43/packages/npm/@frontend/squzanswerer/-/@frontend/squzanswerer-1.0.61.tgz#28d55161617d0b7846f41f74b5cb61bc7f710e7d"
|
||||
integrity sha1-KNVRYWF9C3hG9B90tcthvH9xDn0=
|
||||
dependencies:
|
||||
bowser "1.9.4"
|
||||
country-flag-emoji-polyfill "^0.1.8"
|
||||
|
Loading…
Reference in New Issue
Block a user