- 一次性提示原来挂在题目页的 Form.vue 上消费:学生排着队切去看提交记录, 老师这时取消了他的求助,那条提示就永远没人消费。挪到顶栏统一弹, 教师端的 error 提示同理。另外加了序号——连着两次同样的文案在 Vue 眼里 === 相等,watch(notice) 不会第二次触发。 - queueAhead 原来只在「建请求 / 重连 / 退回排队」推过,前面的人被接走或 被取消之后不重算,第五个学生会一直显示「前面还有 4 人」。跟着 broadcastRequests 一起推,两件事永远同时发生。 - collabDoc 动态 import 了 lib0/encoding 和 lib0/decoding,但 lib0 不在 package.json 里,靠 yjs 提升到根 node_modules 才能解析。上游依赖树一变 就断,而且断在运行时不在构建时。按现装的 0.2.117 钉住。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016DHxhKNxXfG89JnVzHbvgj
This commit is contained in:
@@ -4,6 +4,7 @@ import { RouterLink } from "vue-router"
|
||||
import { useBreakpoints } from "shared/composables/breakpoints"
|
||||
import { useLearnProgress } from "shared/composables/learnProgress"
|
||||
import { useAuthModalStore } from "shared/store/authModal"
|
||||
import { useCollabStore } from "shared/store/collab"
|
||||
import { useScreenModeStore } from "shared/store/screenMode"
|
||||
import { logout } from "../api"
|
||||
import CollabModal from "./CollabModal.vue"
|
||||
@@ -14,6 +15,23 @@ import { trickOrTreat } from "utils/functions"
|
||||
|
||||
const userStore = useUserStore()
|
||||
const configStore = useConfigStore()
|
||||
const collabStore = useCollabStore()
|
||||
const message = useMessage()
|
||||
|
||||
/**
|
||||
* 课堂求助的一次性提示,统一在这里弹。
|
||||
*
|
||||
* 原来挂在题目页的 Form.vue 上:学生排着队切去看提交记录,老师这时候取消了
|
||||
* 他的求助,那条「老师已取消你的求助」就永远没人消费。顶栏是全局的,放这儿
|
||||
* 才收得全 —— 教师端的 error 提示(比如「请先退出当前协作」)同理。
|
||||
*/
|
||||
watch(
|
||||
() => collabStore.noticeSeq,
|
||||
() => {
|
||||
const text = collabStore.consumeNotice()
|
||||
if (text) message.info(text)
|
||||
},
|
||||
)
|
||||
const authStore = useAuthModalStore()
|
||||
const screenModeStore = useScreenModeStore()
|
||||
const route = useRoute()
|
||||
|
||||
Reference in New Issue
Block a user