feat(vocab): update course today plan localization and UI logic
All checks were successful
Deploy to production / deploy (push) Successful in 2m49s
All checks were successful
Deploy to production / deploy (push) Successful in 2m49s
- Added new localization strings for scenarios with no due reviews in German, English, and Spanish, enhancing user guidance. - Updated VocabCourseView to conditionally display the appropriate introduction message based on the presence of due reviews, improving clarity in the course flow.
This commit is contained in:
@@ -53,7 +53,11 @@
|
||||
|
||||
<div v-if="todayRecommendedSteps.length > 0" class="course-today-plan">
|
||||
<h4 class="course-today-plan__title">{{ $t('socialnetwork.vocab.courses.courseTodayPlanTitle') }}</h4>
|
||||
<p class="course-today-plan__intro">{{ $t('socialnetwork.vocab.courses.courseTodayPlanIntro') }}</p>
|
||||
<p class="course-today-plan__intro">
|
||||
{{ dueReviewLessons.length > 0
|
||||
? $t('socialnetwork.vocab.courses.courseTodayPlanIntro')
|
||||
: $t('socialnetwork.vocab.courses.courseTodayPlanIntroNoDueReview') }}
|
||||
</p>
|
||||
<ol class="course-today-plan__list">
|
||||
<li v-for="(step, idx) in todayRecommendedSteps" :key="`${step.type}-${step.lesson.id}-${idx}`" class="course-today-plan__item">
|
||||
<div class="course-today-plan__item-main">
|
||||
@@ -73,7 +77,7 @@
|
||||
</div>
|
||||
|
||||
<div class="course-flow__grid">
|
||||
<article class="course-flow-card">
|
||||
<article v-if="dueReviewLessons.length > 0" class="course-flow-card">
|
||||
<div class="course-flow-card__top">
|
||||
<span class="course-flow-card__badge course-flow-card__badge--review">1</span>
|
||||
<div>
|
||||
@@ -93,12 +97,11 @@
|
||||
<span>{{ formatReviewDue(getLessonProgress(lesson.id, lesson)?.reviewNextDueAt) }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<p v-else class="course-flow-card__empty">{{ $t('socialnetwork.vocab.courses.courseFlowReviewEmpty') }}</p>
|
||||
</article>
|
||||
|
||||
<article class="course-flow-card">
|
||||
<div class="course-flow-card__top">
|
||||
<span class="course-flow-card__badge course-flow-card__badge--block">2</span>
|
||||
<span class="course-flow-card__badge course-flow-card__badge--block">{{ dueReviewLessons.length > 0 ? 2 : 1 }}</span>
|
||||
<div>
|
||||
<h4>{{ $t('socialnetwork.vocab.courses.courseFlowBlockTitle') }}</h4>
|
||||
<p>{{ $t('socialnetwork.vocab.courses.courseFlowBlockDescription') }}</p>
|
||||
@@ -121,7 +124,7 @@
|
||||
|
||||
<article class="course-flow-card">
|
||||
<div class="course-flow-card__top">
|
||||
<span class="course-flow-card__badge course-flow-card__badge--intensive">3</span>
|
||||
<span class="course-flow-card__badge course-flow-card__badge--intensive">{{ dueReviewLessons.length > 0 ? 3 : 2 }}</span>
|
||||
<div>
|
||||
<h4>{{ $t('socialnetwork.vocab.courses.courseFlowIntensiveTitle') }}</h4>
|
||||
<p>{{ $t('socialnetwork.vocab.courses.courseFlowIntensiveDescription') }}</p>
|
||||
@@ -142,7 +145,7 @@
|
||||
|
||||
<article class="course-flow-card">
|
||||
<div class="course-flow-card__top">
|
||||
<span class="course-flow-card__badge course-flow-card__badge--practice">4</span>
|
||||
<span class="course-flow-card__badge course-flow-card__badge--practice">{{ dueReviewLessons.length > 0 ? 4 : 3 }}</span>
|
||||
<div>
|
||||
<h4>{{ $t('socialnetwork.vocab.courses.courseFlowPracticeTitle') }}</h4>
|
||||
<p>{{ $t('socialnetwork.vocab.courses.courseFlowPracticeDescription') }}</p>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<section class="surface-card review-header">
|
||||
<button type="button" class="button-secondary" @click="backToCourse">{{ $t('general.back') }}</button>
|
||||
<div>
|
||||
<h2>Kurz-Wiederholung</h2>
|
||||
<h2>{{ $t('socialnetwork.vocab.courses.quickReviewTitle') }}</h2>
|
||||
<p v-if="lesson">{{ lesson.title }} (#{{ lesson.lessonNumber }})</p>
|
||||
</div>
|
||||
</section>
|
||||
@@ -12,17 +12,17 @@
|
||||
<section v-else-if="!lesson" class="surface-card review-state">{{ $t('socialnetwork.vocab.notFound') }}</section>
|
||||
<section v-else class="surface-card review-body">
|
||||
<p class="review-intro">
|
||||
Kurze Session mit {{ reviewQueue.length }} Begriffen. Nach Abschluss wird die geplante Wiederholung als erledigt markiert.
|
||||
{{ $t('socialnetwork.vocab.courses.quickReviewIntro', { count: reviewQueue.length }) }}
|
||||
</p>
|
||||
|
||||
<div v-if="reviewDone" class="review-done">
|
||||
<h3>Geschafft</h3>
|
||||
<p>Richtig: {{ correctCount }} / {{ reviewQueue.length }}</p>
|
||||
<button type="button" @click="backToCourse">Zurück zum Kurs</button>
|
||||
<h3>{{ $t('socialnetwork.vocab.courses.quickReviewDoneTitle') }}</h3>
|
||||
<p>{{ $t('socialnetwork.vocab.courses.quickReviewDoneScore', { correct: correctCount, total: reviewQueue.length }) }}</p>
|
||||
<button type="button" @click="backToCourse">{{ $t('socialnetwork.vocab.courses.quickReviewBackToCourse') }}</button>
|
||||
</div>
|
||||
|
||||
<div v-else-if="currentItem" class="review-card">
|
||||
<p class="review-progress">Begriff {{ currentIndex + 1 }} von {{ reviewQueue.length }}</p>
|
||||
<p class="review-progress">{{ $t('socialnetwork.vocab.courses.quickReviewProgress', { current: currentIndex + 1, total: reviewQueue.length }) }}</p>
|
||||
<p class="review-question">{{ currentPrompt }}</p>
|
||||
|
||||
<div v-if="mode === 'multiple_choice'" class="review-options">
|
||||
@@ -55,7 +55,7 @@
|
||||
class="button-secondary"
|
||||
@click="advanceAfterFeedback"
|
||||
>
|
||||
Gelesen, weiter
|
||||
{{ $t('socialnetwork.vocab.courses.quickReviewAcknowledge') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -101,8 +101,8 @@ export default {
|
||||
currentPrompt() {
|
||||
if (!this.currentItem) return '';
|
||||
return this.mode === 'multiple_choice'
|
||||
? `Was bedeutet "${this.currentItem.target}"?`
|
||||
: `Tippe auf Zielsprache: "${this.currentItem.gloss}"`;
|
||||
? this.$t('socialnetwork.vocab.courses.quickReviewPromptMeaning', { term: this.currentItem.target })
|
||||
: this.$t('socialnetwork.vocab.courses.quickReviewPromptTarget', { term: this.currentItem.gloss });
|
||||
},
|
||||
submitDisabled() {
|
||||
if (!this.currentItem) return true;
|
||||
|
||||
Reference in New Issue
Block a user