refactor(exams): redesign exam creation page with 3-mode selector

- Replace cramped 3-column grid with vertical layout
- Add 3 large selectable cards at top: Manual / AI / Rich Text Editor
- Rich Text Editor mode redirects to /teacher/exams/new
- Basic info form is now always visible (not hidden in AI mode)
- Exam mode config always visible at bottom
- Add "rich" to mode enum with validation bypass
- Replace all hardcoded English/Chinese strings with i18n keys
- Add 20+ new i18n keys to zh-CN and en (mode labels, descriptions, actions)
- Clean up mixed-language UI text
This commit is contained in:
SpecialX
2026-06-24 13:23:13 +08:00
parent 6114607c1e
commit d1e4ccbf98
7 changed files with 260 additions and 139 deletions

View File

@@ -32,7 +32,32 @@
"createFailed": "Failed to create exam",
"loadFormFailed": "Failed to load form data",
"loadSubjectsFailed": "Failed to load subjects",
"loadGradesFailed": "Failed to load grades"
"loadGradesFailed": "Failed to load grades",
"creating": "Creating...",
"detailsTitle": "Exam Details",
"detailsDesc": "Define the core information for your exam.",
"titlePlaceholder": "e.g. Midterm Mathematics Exam",
"subjectPlaceholder": "Select subject",
"gradePlaceholder": "Select grade level",
"difficultyPlaceholder": "Select level",
"difficultyLevel1": "Level 1 (Easy)",
"difficultyLevel2": "Level 2",
"difficultyLevel3": "Level 3 (Medium)",
"difficultyLevel4": "Level 4",
"difficultyLevel5": "Level 5 (Hard)",
"loadingSubjects": "Loading subjects...",
"loadingGrades": "Loading grades...",
"scheduledAtDesc": "If set, this exam will be scheduled for a specific time.",
"modeManual": "Manual Assembly",
"modeManualDesc": "Manually select questions from the bank and organize structure.",
"modeManualAction": "Create & Start Building",
"modeAi": "AI Generation",
"modeAiDesc": "Paste exam text and AI will auto-parse questions into structured preview.",
"modeAiAction": "Generate in Background",
"modeRich": "Rich Text Editor",
"modeRichDesc": "Use rich text editor to paste exam text, manually or AI-assisted marking of questions, groups, blanks, etc.",
"modeRichHint": "The rich text editor supports selecting text to mark as questions/groups/dotted chars/blanks, with live preview on the right.",
"modeRichAction": "Open Rich Text Editor"
},
"status": {
"draft": "Draft",

View File

@@ -32,7 +32,32 @@
"createFailed": "创建考试失败",
"loadFormFailed": "加载表单数据失败",
"loadSubjectsFailed": "加载科目失败",
"loadGradesFailed": "加载年级失败"
"loadGradesFailed": "加载年级失败",
"creating": "创建中...",
"detailsTitle": "基本信息",
"detailsDesc": "设置考试的核心信息。",
"titlePlaceholder": "例如:期中数学考试",
"subjectPlaceholder": "选择科目",
"gradePlaceholder": "选择年级",
"difficultyPlaceholder": "选择难度",
"difficultyLevel1": "1级 (简单)",
"difficultyLevel2": "2级",
"difficultyLevel3": "3级 (中等)",
"difficultyLevel4": "4级",
"difficultyLevel5": "5级 (困难)",
"loadingSubjects": "加载科目中...",
"loadingGrades": "加载年级中...",
"scheduledAtDesc": "设置后,考试将在指定时间开放。",
"modeManual": "手动组卷",
"modeManualDesc": "从题库手动选择题目并组织试卷结构。",
"modeManualAction": "创建并开始组卷",
"modeAi": "AI 生成",
"modeAiDesc": "粘贴试卷文本,AI 自动解析题目并生成结构化预览。",
"modeAiAction": "后台生成试卷",
"modeRich": "富文本编辑器",
"modeRichDesc": "使用富文本编辑器粘贴试卷文本,手动或 AI 辅助标记题目、分组、填空等。",
"modeRichHint": "富文本编辑器支持选中文本标记题目/分组/加点字/填空,右侧实时预览试卷效果。",
"modeRichAction": "打开富文本编辑器"
},
"status": {
"draft": "草稿",