diff --git a/src/App.vue b/src/App.vue index 63249e3..b6b7683 100644 --- a/src/App.vue +++ b/src/App.vue @@ -33,11 +33,9 @@ onMounted(async () => { const data = await window.electronAPI?.grading.getData() if (data) { if (data.image) gradingStore.setImage(data.image) - if (data.rubric) gradingStore.setRubric(data.rubric) + if (data.questions) gradingStore.setQuestions(data.questions) if (data.result) gradingStore.setResult(data.result) - if (data.questionTitle) gradingStore.setQuestionTitle(data.questionTitle) - if (data.maxScore) gradingStore.setMaxScore(data.maxScore) - if (data.referenceAnswer) gradingStore.setReferenceAnswer(data.referenceAnswer) + if (data.currentQuestionIndex !== undefined) gradingStore.setCurrentQuestionIndex(data.currentQuestionIndex) } appStore.openResultDrawer() } else if (dialogType) { diff --git a/src/components/FloatingToolbar.vue b/src/components/FloatingToolbar.vue index f1cda4b..5f1acb0 100644 --- a/src/components/FloatingToolbar.vue +++ b/src/components/FloatingToolbar.vue @@ -123,7 +123,6 @@ async function startGrading() { appStore.isGrading = true try { - const q = questions[0] const result = await gradeQuestion(0) if (!result) return diff --git a/src/components/ResultDrawer.vue b/src/components/ResultDrawer.vue index 0bf2ed9..b2075bd 100644 --- a/src/components/ResultDrawer.vue +++ b/src/components/ResultDrawer.vue @@ -141,11 +141,6 @@ async function gradeAt(idx: number) { gradingStore.setResult(result) currentIdx.value = idx gradingStore.setCurrentQuestionIndex(idx) - // update rubric bridge currentIndex - await window.electronAPI?.rubric.storeData({ - questions: questions.value, - currentIndex: idx - }) // update grading bridge await window.electronAPI?.grading.storeData({ result,