hintpart rebase

This commit is contained in:
Annie Huang committed 2023-09-27 23:26:57 +08:00
1 parent 2524acecf4
commit 764f558307
5 files changed
+114 -7

No files matched your search

+7
View File
@@ -6,6 +6,7 @@ class SessionManager {
constructor(questId) {
this.questId = questId
this.session = ref(null)
this.hints = ref([])
this.graph = ref(
new FileGraph({
path: '/',
@@ -24,6 +25,7 @@ class SessionManager {
console.log('Update session:', session)
this.session.value = session
this.graph.value = new FileGraph(session.graph)
this.hints.value = session.hints
}
handleGraphUpdate(event) {
@@ -35,6 +37,11 @@ class SessionManager {
}
}
handleHintUpdate(event) {
console.log(event)
this.hints.value.push(...event)
}
setTasks(tasks) {
this.session.value.tasks = tasks
}