- Add error.tsx and loading.tsx boundaries for admin, parent, student, teacher routes - Add admin announcements edit, audit-logs overview, curriculum-map, invitation-codes, permissions, questions, roles routes - Add admin elective detail and components, files, course-plans, users, scheduling boundaries - Add messages group-compose route - Add parent course-plans, elective, grades report-card, practice routes - Add student course-plans, elective detail, error-book dialogs, grades report-card, learning study-path, leave, schedule boundaries - Add teacher attendance report, classes boundaries, course-plans boundaries, elective, exams analytics/edit-rich/all/create/new, grades report-card, homework boundaries, leave, lesson-plans calendar - Add auth loading, onboarding loading, api cron
54 lines
2.0 KiB
TypeScript
54 lines
2.0 KiB
TypeScript
import { Skeleton } from "@/shared/components/ui/skeleton"
|
|
import { Card, CardContent, CardFooter, CardHeader } from "@/shared/components/ui/card"
|
|
|
|
export default function Loading() {
|
|
return (
|
|
<div
|
|
role="status"
|
|
aria-busy="true"
|
|
aria-label="加载中"
|
|
className="space-y-6"
|
|
>
|
|
{/* Header Skeleton */}
|
|
<div className="flex flex-col gap-4 md:flex-row md:items-center md:justify-between">
|
|
<div className="space-y-2">
|
|
<Skeleton className="h-8 w-48" />
|
|
<Skeleton className="h-4 w-96" />
|
|
</div>
|
|
<Skeleton className="h-10 w-32" />
|
|
</div>
|
|
|
|
{/* Toolbar Skeleton */}
|
|
<div className="flex flex-col gap-4 md:flex-row md:items-center justify-between bg-card p-4 rounded-lg border shadow-sm">
|
|
<Skeleton className="h-10 w-full md:w-96" />
|
|
<div className="flex gap-2 w-full md:w-auto">
|
|
<Skeleton className="h-10 w-[140px]" />
|
|
<Skeleton className="h-10 w-[140px]" />
|
|
</div>
|
|
</div>
|
|
|
|
{/* Grid Content Skeleton */}
|
|
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
|
|
{Array.from({ length: 8 }).map((_, i) => (
|
|
<Card key={i} className="h-full overflow-hidden">
|
|
<div className="aspect-[4/3] w-full bg-muted/30 p-6 flex items-center justify-center">
|
|
<Skeleton className="h-24 w-20 rounded-sm" />
|
|
</div>
|
|
<CardHeader className="p-4 pb-2 space-y-2">
|
|
<Skeleton className="h-5 w-16" />
|
|
<Skeleton className="h-6 w-full" />
|
|
</CardHeader>
|
|
<CardContent className="p-4 pt-0 space-y-2">
|
|
<Skeleton className="h-4 w-24" />
|
|
<Skeleton className="h-4 w-32" />
|
|
</CardContent>
|
|
<CardFooter className="p-4 pt-0 mt-auto">
|
|
<Skeleton className="h-6 w-full rounded-md" />
|
|
</CardFooter>
|
|
</Card>
|
|
))}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|