第二期:企业信任风 UI + 打卡科目分类 + 英语语法学习模块

- 全站按 Corporate Trust 设计规范重做:靛蓝/紫罗兰渐变、Plus Jakarta Sans
  自托管字体、带色阴影、卡片悬浮、氛围光斑
- 打卡任务增加科目分类(语文/数学/英语/运动/其他),孩子端按科目分组
- 英语语法自学模块:线性解锁课程 + 课后/周/月测验引擎,测验达标
  自动联动当日英语打卡;家长概览显示语法进度
- 课程内容:A1→B1 完整大纲,9 周 54 课 + 9 周测 + 2 月测,讲解/例句/
  练习/测验均原创,仅参考两份语法书的主题编排

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
jacobxu666
2026-08-03 01:20:04 +08:00
co-authored by Claude Opus 4.8
parent b08f6649be
commit 6ed4d5a61e
45 changed files with 5824 additions and 92 deletions
+7 -1
View File
@@ -8,6 +8,8 @@ import { SESSION_COOKIE, getSessionUser } from "@/lib/auth";
import { daysAgo, todayStr } from "@/lib/dates";
import { ensureDay } from "@/lib/tasks";
import { streakOf } from "@/lib/streak";
import { passedSet } from "@/lib/grammar";
import { TOTAL } from "@/content/grammar";
import { ParentDashboard, type DevicesData, type OverviewData, type TemplatesData } from "./dashboard";
const SHANGHAI = { timeZone: "Asia/Shanghai" } as const;
@@ -32,13 +34,15 @@ export default async function ParentPage() {
const overview: OverviewData = { kids: [] };
for (const kid of kids) {
await ensureDay(kid.id, today); // 家长先看时也要生成今天的快照
const [streak, rows] = await Promise.all([
const [streak, gDone, rows] = await Promise.all([
streakOf(kid.id),
passedSet(kid.id).then((s) => s.size),
db
.select({
id: taskInstances.id,
date: taskInstances.date,
title: taskInstances.title,
subject: taskInstances.subject,
status: taskInstances.status,
isMakeup: taskInstances.isMakeup,
sortOrder: taskInstances.sortOrder,
@@ -63,6 +67,7 @@ export default async function ParentPage() {
total: todayTasks.length,
done: todayTasks.filter((t) => t.status === "done").length,
},
grammar: { done: gDone, total: TOTAL },
week,
});
}
@@ -85,6 +90,7 @@ export default async function ParentPage() {
id: t.id,
dow: t.dow,
title: t.title,
subject: t.subject,
requiresPhoto: t.requiresPhoto,
})),
})),