diff --git a/app/checkin-client.tsx b/app/checkin-client.tsx index 4cfd07f..4719e63 100644 --- a/app/checkin-client.tsx +++ b/app/checkin-client.tsx @@ -32,6 +32,12 @@ export default function CheckinClient() { const dates = Array.from({ length }, (_, i) => "2026-" + String(month + 1).padStart(2, "0") + "-" + String(i + 1).padStart(2, "0")); const seconds = Math.max(0, Math.floor((new Date("2026-12-12T15:00:00+08:00").getTime() - now) / 1000)); const remaining = { days: Math.floor(seconds / 86400), hours: Math.floor(seconds % 86400 / 3600), minutes: Math.floor(seconds % 3600 / 60) }; + const localHour = Number(new Intl.DateTimeFormat("en-US", { hour: "2-digit", hourCycle: "h23", timeZone: "Asia/Shanghai" }).format(new Date(now))); + const greeting = localHour < 6 ? "夜深了,今天不必追赶进度,稳稳完成一件事就很好。" : localHour < 11 ? "早上好,先从最清晰的一项开始,把节奏带起来。" : localHour < 18 ? "下午好,接着把计划往前推进,专注下一步就够了。" : "晚上好,给今天留一次扎实的收尾,让明天更轻松。"; + const taskNarrative = day.tasks.map(task => task.text).join(",接着"); + const countdownNarrative = remaining.days > 60 ? `距离六级笔试还有 ${remaining.days} 天,现在最重要的是把每天的复习节奏走稳。` : remaining.days > 30 ? `距离六级笔试还有 ${remaining.days} 天,该让专项练习更有针对性了。` : remaining.days > 14 ? `距离六级笔试还有 ${remaining.days} 天,真题和时间分配会成为接下来的重点。` : remaining.days > 7 ? `距离六级笔试还有 ${remaining.days} 天,开始把易错点收拢成自己的清单。` : remaining.days > 0 ? `距离六级笔试只剩 ${remaining.days} 天,保持手感、相信已完成的积累。` : "考试日已到,按自己的节奏完成最后准备。"; + const progressNarrative = done.length === day.tasks.length ? "今天的清单已经全部完成,可以安心收尾。" : done.length === 0 ? "今天还没有开始,先完成第一项就已经在前进。" : `你已经完成 ${done.length} 项,还剩 ${day.tasks.length - done.length} 项。`; + const smartTip = `${greeting}${countdownNarrative}${isToday ? "今天" : `你正在查看 ${fmt(day.date)},当天`}的安排是:${taskNarrative}。${progressNarrative}`; useEffect(() => { const id = window.setInterval(() => setNow(Date.now()), 30000); return () => window.clearInterval(id); }, []); useEffect(() => { const today = new Intl.DateTimeFormat("en-CA", { timeZone: "Asia/Shanghai" }).format(new Date()); if (localStorage.getItem("cet6-countdown-notice") !== today) setShowCountdown(true); }, []); @@ -42,6 +48,7 @@ export default function CheckinClient() { const closeCountdown = () => { const today = new Intl.DateTimeFormat("en-CA", { timeZone: "Asia/Shanghai" }).format(new Date()); localStorage.setItem("cet6-countdown-notice", today); setShowCountdown(false); }; return
{ if (!open) closeCountdown(); }}>

CET-6 · 考试倒计时

今天也离目标更近一步2026 年 12 月 12 日 15:00 笔试
{remaining.days}天{String(remaining.hours).padStart(2, "0")}时{String(remaining.minutes).padStart(2, "0")}分

今天的任务,完成一项就是一次推进。

CET-6 · 2026

大学英语六级 · 90天打卡

从今天的一件事开始,完成比完美重要。

任务总览数据统计复盘与冲刺

{saving ? "正在云端保存…" : status}

+

TODAY'S NOTE

今天怎么推进

{smartTip}

} value={Math.round(finished / total * 100) + "%"} label="总体完成度" detail={finished + " / " + total + " 项任务"} />} value={complete + " 天"} label="完整完成" detail="目标共 90 天" />} value={day.phase} label="当前阶段" detail="12 月 12 日笔试" />

距离六级笔试

{remaining.days}天 {remaining.hours}时 {remaining.minutes}分2026 年 12 月 12 日 15:00

{day.phase} · {day.week}

{fmt(day.date)}

{isFuture ? "未来日期,暂不可打卡" : isMakeup ? "补打卡 · 已完成项目不可取消" : "今日打卡"} · 已完成 {done.length} / {day.tasks.length} 项
{isToday ? "正在处理今天的任务" : "正在查看 " + fmt(day.date)}{!isToday && }
{day.tasks.map(t => { const locked = isFuture || (isMakeup && done.includes(t.key)); return ; })}

今日状态

{["专注", "平稳", "有点累", "需要调整"].map(m => )}