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:
@@ -1,18 +1,18 @@
|
||||
import type { JSX } from "react"
|
||||
import { getTranslations } from "next-intl/server"
|
||||
import { ExamForm } from "@/modules/exams/components/exam-form"
|
||||
|
||||
export const dynamic = "force-dynamic"
|
||||
|
||||
export default function CreateExamPage(): JSX.Element {
|
||||
export default async function CreateExamPage(): Promise<JSX.Element> {
|
||||
const t = await getTranslations("examHomework")
|
||||
return (
|
||||
<div className="flex w-full justify-center items-center min-h-[calc(100vh-160px)] p-8 max-w-[1200px] mx-auto">
|
||||
<div className="w-full space-y-6">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold tracking-tight">Create Exam</h1>
|
||||
<p className="text-muted-foreground">Configure a new exam for your classes.</p>
|
||||
</div>
|
||||
<ExamForm />
|
||||
<div className="mx-auto w-full max-w-[1200px] space-y-6 p-6">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold tracking-tight">{t("exam.form.createTitle")}</h1>
|
||||
<p className="text-muted-foreground">{t("exam.form.createDescription")}</p>
|
||||
</div>
|
||||
<ExamForm />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user