diff --git a/public/android-chrome-192x192.png b/public/android-chrome-192x192.png deleted file mode 100644 index acfcce7a..00000000 Binary files a/public/android-chrome-192x192.png and /dev/null differ diff --git a/public/android-chrome-512x512.png b/public/android-chrome-512x512.png deleted file mode 100644 index 4c931fd6..00000000 Binary files a/public/android-chrome-512x512.png and /dev/null differ diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png deleted file mode 100644 index 90e31de7..00000000 Binary files a/public/apple-touch-icon.png and /dev/null differ diff --git a/public/browserconfig.xml b/public/browserconfig.xml deleted file mode 100644 index b3930d0f..00000000 --- a/public/browserconfig.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - #da532c - - - diff --git a/public/favicon-16x16.png b/public/favicon-16x16.png deleted file mode 100644 index 5aae9e71..00000000 Binary files a/public/favicon-16x16.png and /dev/null differ diff --git a/public/favicon-32x32.png b/public/favicon-32x32.png deleted file mode 100644 index 8e6907d5..00000000 Binary files a/public/favicon-32x32.png and /dev/null differ diff --git a/public/favicon.png b/public/favicon.png new file mode 100644 index 00000000..5007b2c5 Binary files /dev/null and b/public/favicon.png differ diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 00000000..d8a170dc --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + diff --git a/public/favicon192.png b/public/favicon192.png new file mode 100644 index 00000000..c703bc98 Binary files /dev/null and b/public/favicon192.png differ diff --git a/public/favicon512.png b/public/favicon512.png new file mode 100644 index 00000000..513918af Binary files /dev/null and b/public/favicon512.png differ diff --git a/public/index.html b/public/index.html index daa88ffe..4da95520 100755 --- a/public/index.html +++ b/public/index.html @@ -2,18 +2,45 @@ - + + Pena Quiz + + + + + + + + + - - - Pena Quiz diff --git a/public/manifest.json b/public/manifest.json old mode 100755 new mode 100644 index 99698376..56f9fd3f --- a/public/manifest.json +++ b/public/manifest.json @@ -1,23 +1,10 @@ { - "short_name": "React App", - "name": "Create React App Sample", + "short_name": "PenaHub", + "name": "Pena Hub", "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "android-chrome-192x192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "android-chrome-512x512.png", - "type": "image/png", - "sizes": "512x512" - } - ], + { "src": "/favicon192.png", "type": "image/png", "sizes": "192x192" }, + { "src": "/favicon512.png", "type": "image/png", "sizes": "512x512" } + ], "start_url": ".", "display": "standalone", "theme_color": "#000000", diff --git a/public/mstile-150x150.png b/public/mstile-150x150.png deleted file mode 100644 index 2db962c8..00000000 Binary files a/public/mstile-150x150.png and /dev/null differ diff --git a/public/safari-pinned-tab.svg b/public/safari-pinned-tab.svg deleted file mode 100644 index d2af8af6..00000000 --- a/public/safari-pinned-tab.svg +++ /dev/null @@ -1,48 +0,0 @@ - - - - -Created by potrace 1.14, written by Peter Selinger 2001-2017 - - - - - - - diff --git a/public/site.webmanifest b/public/site.webmanifest deleted file mode 100644 index fa99de77..00000000 --- a/public/site.webmanifest +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "", - "short_name": "", - "icons": [ - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" -} diff --git a/src/api/auth.ts b/src/api/auth.ts index 23a9301d..dfa6dec4 100644 --- a/src/api/auth.ts +++ b/src/api/auth.ts @@ -87,10 +87,8 @@ export async function recover( useToken: false, withCredentials: true, }); - console.log(recoverResponse); return [recoverResponse]; } catch (nativeError) { - console.log(nativeError); const [error] = parseAxiosError(nativeError); return [null, `Не удалось восстановить пароль. ${error}`]; diff --git a/src/assets/icons/Info.tsx b/src/assets/icons/Info.tsx index eb52ae8e..623fede3 100644 --- a/src/assets/icons/Info.tsx +++ b/src/assets/icons/Info.tsx @@ -6,6 +6,7 @@ type InfoProps = { sx?: SxProps; onClick?: any; className?: string; + color?: string; }; export default function Info({ @@ -14,6 +15,7 @@ export default function Info({ sx, onClick, className, + color = "#7e2aea", }: InfoProps) { return ( @@ -26,21 +28,21 @@ export default function Info({ > diff --git a/src/assets/icons/InfoIcon.tsx b/src/assets/icons/InfoIcon.tsx index 7aae8f1a..f5cbf077 100755 --- a/src/assets/icons/InfoIcon.tsx +++ b/src/assets/icons/InfoIcon.tsx @@ -3,10 +3,11 @@ import { Box, useTheme } from "@mui/material"; import type { SxProps } from "@mui/material"; type InfoIconProps = { + color?: string; sx?: SxProps; }; -export default function InfoIcon({ sx }: InfoIconProps) { +export default function InfoIcon({ sx, color = "#7e2aea" }: InfoIconProps) { const theme = useTheme(); return ( @@ -29,21 +30,21 @@ export default function InfoIcon({ sx }: InfoIconProps) { > diff --git a/src/model/questionTypes/file.ts b/src/model/questionTypes/file.ts index 1a66b78a..818cbb7c 100644 --- a/src/model/questionTypes/file.ts +++ b/src/model/questionTypes/file.ts @@ -1,7 +1,6 @@ import type { QuizQuestionBase, QuestionHint, PreviewRule } from "./shared"; export const UPLOAD_FILE_TYPES_MAP = { - all: "Все типы файлов", picture: "Изображения", video: "Видео", audio: "Аудио", diff --git a/src/pages/ContactFormPage/ContactFormPage.tsx b/src/pages/ContactFormPage/ContactFormPage.tsx index d77e8b26..e4757860 100644 --- a/src/pages/ContactFormPage/ContactFormPage.tsx +++ b/src/pages/ContactFormPage/ContactFormPage.tsx @@ -60,30 +60,31 @@ export default function ContactFormPage() { - - - Как собрать данные посетителя - {" "} - {/* - - */} - + {/**/} + {/* */} + {/* Как собрать данные посетителя*/} + {/* {" "}*/} + {/* /!* */} + {/* */} + {/* *!/*/} + {/**/} {!quiz?.config.formContact.fields.name.used && !quiz?.config.formContact.fields.email.used && !quiz?.config.formContact.fields.phone.used && diff --git a/src/pages/ContactFormPage/NewField/NewFieldParent.tsx b/src/pages/ContactFormPage/NewField/NewFieldParent.tsx index d3a44318..774ab34f 100644 --- a/src/pages/ContactFormPage/NewField/NewFieldParent.tsx +++ b/src/pages/ContactFormPage/NewField/NewFieldParent.tsx @@ -21,6 +21,7 @@ interface Props { placeholderHelp: string; placeholderField: string; closeDrawer: () => void; + noinputs: boolean; } export default function NewFieldParent({ @@ -30,6 +31,7 @@ export default function NewFieldParent({ placeholderField, outerContainerSx: sx, children, + noinputs = false, }: Props) { const quiz = useCurrentQuiz(); @@ -44,65 +46,71 @@ export default function NewFieldParent({ gap: "20px", }} > - - Подсказка - { - updateQuiz(quiz.id, (quiz) => { - quiz.config.formContact.fields[defaultValue].text = target.value; - }); - }} - value={quiz.config.formContact.fields[defaultValue].text} - placeholder={placeholderHelp} - text={""} - /> - - - Подсказка внутри поля - { - updateQuiz(quiz.id, (quiz) => { - quiz.config.formContact.fields[defaultValue].innerText = - target.value; - }); - }} - value={quiz.config.formContact.fields[defaultValue].innerText} - placeholder={placeholderField} - text={""} - /> - - - Ключ - { - updateQuiz(quiz.id, (quiz) => { - quiz.config.formContact.fields[defaultValue].key = target.value; - }); - }} - placeholder="text" - sx={{ - "& .css-1d3z3hw-MuiOutlinedInput-notchedOutline": { - border: "none", - }, - "& .MuiInputBase-root": { - height: "48px", - borderRadius: "10px", - backgroundColor: "#EEE4FC", - }, - }} - /> - { - updateQuiz(quiz.id, (quiz) => { - quiz.config.formContact.fields[defaultValue].required = - target.checked; - }); - }} - label={"Обязательно к заполнению"} - /> - + {!noinputs && ( + <> + + Название поля + { + updateQuiz(quiz.id, (quiz) => { + quiz.config.formContact.fields[defaultValue].text = + target.value; + }); + }} + value={quiz.config.formContact.fields[defaultValue].text} + placeholder={placeholderHelp} + text={""} + /> + + + Подсказка внутри поля + { + updateQuiz(quiz.id, (quiz) => { + quiz.config.formContact.fields[defaultValue].innerText = + target.value; + }); + }} + value={quiz.config.formContact.fields[defaultValue].innerText} + placeholder={placeholderField} + text={""} + /> + + + )} + + {/**/} + {/* Ключ*/} + {/* {*/} + {/* updateQuiz(quiz.id, (quiz) => {*/} + {/* quiz.config.formContact.fields[defaultValue].key = target.value;*/} + {/* });*/} + {/* }}*/} + {/* placeholder="text"*/} + {/* sx={{*/} + {/* "& .css-1d3z3hw-MuiOutlinedInput-notchedOutline": {*/} + {/* border: "none",*/} + {/* },*/} + {/* "& .MuiInputBase-root": {*/} + {/* height: "48px",*/} + {/* borderRadius: "10px",*/} + {/* backgroundColor: "#EEE4FC",*/} + {/* },*/} + {/* }}*/} + {/* />*/} + {/* {*/} + {/* updateQuiz(quiz.id, (quiz) => {*/} + {/* quiz.config.formContact.fields[defaultValue].required =*/} + {/* target.checked;*/} + {/* });*/} + {/* }}*/} + {/* label={"Обязательно к заполнению"}*/} + {/* />*/} + {/**/} {/* Запрашивать на diff --git a/src/pages/ContactFormPage/NewField/SwitchNewField.tsx b/src/pages/ContactFormPage/NewField/SwitchNewField.tsx index 0188a360..ca80c0db 100644 --- a/src/pages/ContactFormPage/NewField/SwitchNewField.tsx +++ b/src/pages/ContactFormPage/NewField/SwitchNewField.tsx @@ -25,6 +25,7 @@ export default function SwitchNewField({ closeDrawer={closeDrawer} placeholderHelp={"Введите имя"} placeholderField={"Дмитрий"} + noinputs={true} defaultValue={"name"} /> ); @@ -34,6 +35,7 @@ export default function SwitchNewField({ closeDrawer={closeDrawer} placeholderHelp={"Введите Email"} placeholderField={"mail@example.ru"} + noinputs={true} defaultValue={"email"} /> ); @@ -43,6 +45,7 @@ export default function SwitchNewField({ closeDrawer={closeDrawer} placeholderHelp={"Введите номер"} placeholderField={"+7 900 000 00 00"} + noinputs={true} defaultValue={"phone"} > {/* ); @@ -78,6 +82,7 @@ export default function SwitchNewField({ closeDrawer={closeDrawer} placeholderHelp={"Введите адрес"} placeholderField={"Москва, Лаврушинский пер., 10"} + noinputs={true} defaultValue={"address"} /> ); diff --git a/src/pages/ContactFormPage/NewField/WindowNewField.tsx b/src/pages/ContactFormPage/NewField/WindowNewField.tsx index f7c8bf7e..0a3df6f2 100644 --- a/src/pages/ContactFormPage/NewField/WindowNewField.tsx +++ b/src/pages/ContactFormPage/NewField/WindowNewField.tsx @@ -128,7 +128,11 @@ export default function WindowNewField({ drawerState, closeDrawer }: Props) { {buttonSetting.flatMap((e, i) => drawerState.field === e.value || drawerState.field === "all" ? ( { SSHC(e.value); @@ -139,9 +143,13 @@ export default function WindowNewField({ drawerState, closeDrawer }: Props) { ? theme.palette.brightPurple.main : "transparent", color: - switchState === e.value && drawerState.field === "all" + (switchState === e.value && drawerState.field === "all") || + drawerState.field === e.value ? "#ffffff" : theme.palette.grey3.main, + "&:hover": { + background: switchState === e.value ? "#581CA7" : "#f5f5f5", + }, }} > {e.icon} diff --git a/src/pages/DesignPage/DesignPage.tsx b/src/pages/DesignPage/DesignPage.tsx index d1cdf236..bd9a26c5 100644 --- a/src/pages/DesignPage/DesignPage.tsx +++ b/src/pages/DesignPage/DesignPage.tsx @@ -62,7 +62,6 @@ export const DesignPage = () => { setCurrentStep(index); }; - console.log(quiz); if (quiz === undefined) return ( diff --git a/src/pages/InstallQuiz/InstallQuiz.tsx b/src/pages/InstallQuiz/InstallQuiz.tsx index faa2bb2b..b955059b 100644 --- a/src/pages/InstallQuiz/InstallQuiz.tsx +++ b/src/pages/InstallQuiz/InstallQuiz.tsx @@ -43,12 +43,13 @@ import VidjetInstall from "./VidjetInstall"; import InstallQzCode from "./InstallQzCode"; import { incrementCurrentStep, updateQuiz } from "@root/quizes/actions"; import { useCurrentQuiz } from "@root/quizes/hooks"; +import { useDomainDefine } from "@utils/hooks/useDomainDefine"; type BackgroundType = "text" | "video"; export default function InstallQuiz() { const quiz = useCurrentQuiz(); - + const { isTestServer } = useDomainDefine(); const [display, setDisplay] = React.useState("1"); const handleChange = (event: SelectChangeEvent) => { setDisplay(event.target.value); @@ -194,8 +195,9 @@ export default function InstallQuiz() { 760 - готовых шаблонов для разных ниш + + готовых шаблонов для разных ниш

(в разработке) +
diff --git a/src/pages/Landing/FooterLanding.tsx b/src/pages/Landing/FooterLanding.tsx index 0708e15c..fb9dc7d2 100644 --- a/src/pages/Landing/FooterLanding.tsx +++ b/src/pages/Landing/FooterLanding.tsx @@ -121,7 +121,12 @@ export default function Component() { >