fix: progress bar now shows milestone progress instead of overall progress
This commit is contained in:
@@ -318,10 +318,9 @@ let lastMilestoneReached = 0;
|
|||||||
function updateProgressDisplay() {
|
function updateProgressDisplay() {
|
||||||
const stats = lessonEngine.getProgressStats();
|
const stats = lessonEngine.getProgressStats();
|
||||||
|
|
||||||
// Update progress bar - shows overall progress with full gradient
|
// Update progress bar - shows progress towards next milestone
|
||||||
const progressPercent = stats.percentComplete || 1;
|
const progressPercent = stats.progressToNext || 1;
|
||||||
elements.progressFill.style.width = `${progressPercent}%`;
|
elements.progressFill.style.width = `${progressPercent}%`;
|
||||||
elements.progressFill.style.setProperty('--progress-percent', progressPercent);
|
|
||||||
|
|
||||||
// Update progress current - show progress towards next milestone
|
// Update progress current - show progress towards next milestone
|
||||||
elements.progressCurrent.textContent = `${stats.totalCompleted}/${stats.nextMilestone}`;
|
elements.progressCurrent.textContent = `${stats.totalCompleted}/${stats.nextMilestone}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user