feat(点评): 点评轮盘换成一排大按钮,选之前不显示人数,选完看大家怎么选、直接去下一题

- 七个选项不变,排成 4 + 3 的大按钮(表情 + 15px 的字)。原来的轮盘要把鼠标移到扇区上
  才看得清,每块的字只有 12px 左右;还用了 Chrome 111 才有的 color-mix(),机房 105 那档
  渲染不出扇区底色
- 选之前不显示「N 人选择」,免得跟风;选完换成横条图,标出自己选的那一项
- 防误触:弹出后 600ms 内点不了,强制弹窗里不响应 Enter / 空格,也不预选任何一项
- 选完弹窗不马上关,下面只有一个按钮、焦点就在上面:这节课的「下一题」,或者刚才被拦下
  的换题「继续」,都没有就是「好的」
- 标题从「恭喜你成功提交」改成「做对了!」:交上去不等于做对
- 提交失败留在弹窗里提示「没记上,再点一次」;没做对的人在抽屉里只看到一句说明

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-09-28 16:22:48 +08:00
1 parent 116b0a2c95
commit c64b0a402b
5 files changed
+304 -550

No files matched your search

+18 -1
View File
@@ -49,10 +49,27 @@ export const useLessonStore = defineStore("lesson", () => {
return !!find(problemDisplayId)
}
/**
* 通过这道之后该去哪一道:按列表顺序排在这道**后面**、还没通过的第一道,后面都做完了
* 再从头找 —— 学生常常跳着做,先做完了第 3 道再回头做第 1 道。当前这道本身不看它的
* myStatus:重拉回来之前,它还是通过之前那一刻的状态。
* 这道不在这节课里返回 null;在,但别的都做完了,next 为 null。
*/
function nextAfter(problemDisplayId: string) {
const list = activity.value?.problems ?? []
const id = problemDisplayId.toLowerCase()
const index = list.findIndex((item) => item.problemDisplayId.toLowerCase() === id)
if (index < 0) return null
const rest = [...list.slice(index + 1), ...list.slice(0, index)].filter(
(item) => item.myStatus !== "accepted",
)
return { total: list.length, next: rest[0] ?? null, remaining: rest.length }
}
/** 老师布置的叫「老师布置的题」,推断出来的叫「这节课的题」 */
const label = computed(() =>
activity.value?.source === "teacher" ? "老师布置的题" : "这节课的题",
)
return { activity, label, load, markAccepted, includes }
return { activity, label, load, markAccepted, includes, nextAfter }
})