чекбокс для отключения стартовой страницы
This commit is contained in:
parent
80db0c1786
commit
9506e46adb
@ -456,7 +456,29 @@ export default function StartPageSettings({ handleNext }: HandleNext) {
|
|||||||
maxWidth: "1200px"
|
maxWidth: "1200px"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Button variant="outlined" sx={{backgroundColor: "transparent", color: theme.palette.brightPurple.main}}>Отключить стартовую страницу</Button>
|
<FormControlLabel
|
||||||
|
control={
|
||||||
|
<Checkbox
|
||||||
|
icon={<Button variant="outlined" sx={{backgroundColor: "transparent", color: theme.palette.brightPurple.main}}>Отключить стартовую страницу</Button>}
|
||||||
|
checkedIcon={<Button variant="outlined" sx={{backgroundColor: theme.palette.brightPurple.main, color: "white"}}>Включить стартовую страницу</Button>}
|
||||||
|
sx={{
|
||||||
|
borderRadius: 0,
|
||||||
|
padding: 0}}
|
||||||
|
onChange={(e) => {
|
||||||
|
let SPageClone = listQuizes[params].config
|
||||||
|
SPageClone.noStartPage = e.target.checked
|
||||||
|
updateQuizesList(params, {config: SPageClone })}}
|
||||||
|
checked={listQuizes[params].config.noStartPage}
|
||||||
|
/>}
|
||||||
|
label= ""
|
||||||
|
sx={{
|
||||||
|
color: theme.palette.brightPurple.main,
|
||||||
|
ml: "-9px",
|
||||||
|
userSelect: "none",
|
||||||
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
/>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@ -39,6 +39,7 @@ interface Quizes {
|
|||||||
config: {
|
config: {
|
||||||
type: string,
|
type: string,
|
||||||
logo: string,
|
logo: string,
|
||||||
|
noStartPage: boolean,
|
||||||
startpage: {
|
startpage: {
|
||||||
description: string,
|
description: string,
|
||||||
button: string,
|
button: string,
|
||||||
@ -118,6 +119,7 @@ export const quizStore = create<QuizStore>()(
|
|||||||
"step": 1,
|
"step": 1,
|
||||||
"startpage": "",
|
"startpage": "",
|
||||||
"config": {
|
"config": {
|
||||||
|
"noStartPage": false,
|
||||||
"type": "", // quiz или form
|
"type": "", // quiz или form
|
||||||
"logo": "hub.pena.digital/img/logo",
|
"logo": "hub.pena.digital/img/logo",
|
||||||
"startpage": {
|
"startpage": {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user