From 9d0164aa0d0d1450d1fe876957b760560a50860f Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Thu, 27 Aug 2026 10:42:01 +0200 Subject: [PATCH] feat(vocab): restore manual hard vocabulary removal --- .../socialnetwork/VocabPracticeDialog.vue | 8 +++++-- frontend/src/views/social/VocabCourseView.vue | 22 +++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/frontend/src/dialogues/socialnetwork/VocabPracticeDialog.vue b/frontend/src/dialogues/socialnetwork/VocabPracticeDialog.vue index 5dd57f7..5938648 100755 --- a/frontend/src/dialogues/socialnetwork/VocabPracticeDialog.vue +++ b/frontend/src/dialogues/socialnetwork/VocabPracticeDialog.vue @@ -78,6 +78,9 @@ +
@@ -414,12 +417,13 @@ export default { }); return true; }, - unmarkCurrentAsHard() { + async unmarkCurrentAsHard() { if (!this.current) return; const matchingKey = this.findMatchingHardKey(this.current); if (!matchingKey) return; this.removeHardEntriesForItem(this.current); this.saveHardVocabMap(); + await this.clearSrsHardStatus(this.current); this.maybeFinishHardPhase(); }, addCurrentToCycle() { @@ -1252,7 +1256,7 @@ export default { clearSrsHardStatus(item) { const itemKey = String(item?.itemKey || item?.id || '').trim(); if (!itemKey || !this.openParams?.courseId) return; - apiClient.patch('/api/vocab/srs/hard', { + return apiClient.patch('/api/vocab/srs/hard', { courseId: this.openParams.courseId, itemKey }).catch((error) => { diff --git a/frontend/src/views/social/VocabCourseView.vue b/frontend/src/views/social/VocabCourseView.vue index 3ecfa2b..b68d8bd 100755 --- a/frontend/src/views/social/VocabCourseView.vue +++ b/frontend/src/views/social/VocabCourseView.vue @@ -46,6 +46,13 @@ {{ entry.learning }} {{ entry.reference }}
+ @@ -606,6 +613,21 @@ export default { this.hardVocabList = []; } }, + async unmarkHardVocab(entry) { + const itemKey = String(entry?.itemKey || entry?.key || '').trim(); + if (!itemKey || !this.courseId) return; + try { + await apiClient.patch('/api/vocab/srs/hard', { + courseId: this.courseId, + itemKey + }); + this.hardVocabList = this.hardVocabList + .filter((item) => String(item?.itemKey || item?.key || '').trim() !== itemKey); + } catch (error) { + console.warn('Konnte die Hart-Markierung nicht entfernen:', error); + await this.refreshHardVocabList(); + } + }, handleWindowFocus() { this.refreshHardVocabList(); this.syncSrsSessionProgress();