feat(vocab): restore manual hard vocabulary removal
This commit is contained in:
@@ -78,6 +78,9 @@
|
||||
<button v-else-if="showSkipButton" @click="skip">
|
||||
{{ $t('socialnetwork.vocab.practice.skip') }}
|
||||
</button>
|
||||
<button v-if="isCurrentMarkedHard" @click="unmarkCurrentAsHard">
|
||||
{{ $t('socialnetwork.vocab.practice.unmarkHard') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div v-if="lastWrongReview" class="solution-card solution-card--persistent">
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user