frontPanel/src/model/quizSettings.ts

77 lines
2.3 KiB
TypeScript
Raw Normal View History

2023-11-13 18:04:51 +00:00
export const quizSetupSteps = {
1: { displayStep: 1, text: "Настройка стартовой страницы" },
2: { displayStep: 1, text: "Настройка стартовой страницы" },
3: { displayStep: 1, text: "Настройка стартовой страницы" },
4: { displayStep: 2, text: "Задайте вопросы" },
5: { displayStep: 3, text: "Настройте авторезультаты" },
6: { displayStep: 3, text: "Настройте авторезультаты" },
7: { displayStep: 4, text: "Оценка графа карты вопросов" },
8: { displayStep: 5, text: "Настройте форму контактов" },
9: { displayStep: 6, text: "Установите квиз" },
10: { displayStep: 7, text: "Запустите рекламу" },
} as const;
2023-11-14 13:09:55 +00:00
export const maxQuizSetupSteps = Math.max(...Object.keys(quizSetupSteps).map(n => parseInt(n)));
2023-11-13 18:04:51 +00:00
export const maxDisplayQuizSetupSteps = Math.max(...Object.values(quizSetupSteps).map(v => v.displayStep));
export type QuizSetupStep = keyof typeof quizSetupSteps;
2023-11-14 13:09:55 +00:00
export type QuizStartpageType = "standard" | "expanded" | "centered";
export type QuizStartpageAlignType = "left" | "right" | "center";
2023-11-13 18:04:51 +00:00
export interface QuizConfig {
type: "quiz" | "form";
logo: string;
noStartPage: boolean;
2023-11-14 13:09:55 +00:00
startpageType: QuizStartpageType;
2023-11-13 18:04:51 +00:00
startpage: {
description: string;
button: string;
2023-11-14 13:09:55 +00:00
position: QuizStartpageAlignType;
2023-11-13 18:04:51 +00:00
background: {
2023-11-14 13:09:55 +00:00
type: null | "image" | "video";
2023-11-13 18:04:51 +00:00
desktop: string;
mobile: string;
video: string;
cycle: boolean;
};
};
info: {
phonenumber: string;
clickable: boolean;
orgname: string;
site: string;
law?: string;
};
meta: string;
}
export const defaultQuizConfig: QuizConfig = {
type: "quiz",
logo: "",
noStartPage: false,
startpageType: "standard",
startpage: {
description: "",
button: "",
position: "left",
background: {
2023-11-14 13:09:55 +00:00
type: null,
2023-11-13 18:04:51 +00:00
desktop: "",
mobile: "",
video: "",
cycle: false,
},
},
info: {
phonenumber: "",
clickable: false,
orgname: "",
site: "",
law: "",
},
meta: "",
};