feat: make hints a group in one stage

This commit is contained in:
Lin, Hung-Shin committed 2023-11-21 11:55:32 +08:00
1 parent 42ac27126c
commit 36f53da08a
4 files changed
+12 -6

No files matched your search

+9 -3
View File
@@ -60,9 +60,15 @@ const right = () => {
</div> </div>
</div> </div>
<div id="hint" class="bg-bg flex flex-wrap p-8"> <div id="hint" class="bg-bg flex flex-wrap p-8">
<p class="text-text font-xl whitespace-pre-wrap"> <ul>
{{ sessionStore.session.hints[current] }} <li
</p> v-for="hint in sessionStore.session.hints[current]"
:key="hint"
class="text-text font-xl whitespace-pre-wrap"
>
➤ {{ hint }}
</li>
</ul>
<br /> <br />
</div> </div>
</template> </template>
+1 -1
View File
@@ -86,7 +86,7 @@ function updateGraph(event) {
} }
function updateHints(hints) { function updateHints(hints) {
store.session.hints.push(...hints) store.session.hints.push(hints)
} }
function updateStatus(status) { function updateStatus(status) {
+1 -1
View File
@@ -54,7 +54,7 @@ const Session = model(
required: true, required: true,
}, },
tasks: [taskSchema], tasks: [taskSchema],
hints: [String], hints: [[String]],
graph: { graph: {
type: nodeSchema, type: nodeSchema,
default: { default: {
+1 -1
View File
@@ -47,7 +47,7 @@ export default class SessionHandler {
t.completed = true t.completed = true
}) })
this.session.hints.push(...stage.hints) this.session.hints.push(stage.hints)
this.addNewTasks() this.addNewTasks()