feat: improve progress display with gradient milestones

- Progress text now says "X of Y lessons completed" in all languages
- Each milestone badge shows a portion of the gradient based on position
- Progress bar shows full gradient, cropped to current progress percentage

🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
2026-01-16 15:08:57 +01:00
parent 2aa35cea2d
commit baaf05dda4
3 changed files with 23 additions and 12 deletions

View File

@@ -317,8 +317,10 @@ let lastMilestoneReached = 0;
function updateProgressDisplay() {
const stats = lessonEngine.getProgressStats();
// Update progress bar (now shows progress to next milestone)
elements.progressFill.style.width = `${stats.progressToNext}%`;
// Update progress bar - shows overall progress with full gradient
const progressPercent = stats.percentComplete || 1;
elements.progressFill.style.width = `${progressPercent}%`;
elements.progressFill.style.setProperty('--progress-percent', progressPercent);
// Update progress text - show completed of total lessons
elements.progressText.textContent = t("progressTextMilestone", {