fix: hide lesson counter in playground mode

- Hide level indicator (1/1) in playground mode
- Show only module title in header pill for playground
- Keep nav buttons hidden in playground

🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
2026-01-16 05:02:40 +01:00
parent c0e1dab0d9
commit c59736c0e2

View File

@@ -628,12 +628,23 @@ function loadCurrentLesson() {
elements.previewWrapper?.classList.remove("completed-glow"); elements.previewWrapper?.classList.remove("completed-glow");
} }
// Update level indicator // Update level indicator (hide in playground mode)
renderLevelIndicator(elements.levelIndicator, engineState.lessonIndex + 1, engineState.totalLessons); const isPlayground = engineState.lesson?.mode === "playground";
if (isPlayground) {
elements.levelIndicator.classList.add("hidden");
} else {
elements.levelIndicator.classList.remove("hidden");
renderLevelIndicator(elements.levelIndicator, engineState.lessonIndex + 1, engineState.totalLessons);
}
// Header pill shows module name + level (clickable link to return to lesson) // Header pill shows module name + level (clickable link to return to lesson)
if (elements.headerLevelPill && engineState.module) { if (elements.headerLevelPill && engineState.module) {
const label = t("lessonLabel"); if (isPlayground) {
elements.headerLevelPill.innerHTML = `<span class="header-module-name">${engineState.module.title}</span> <span class="header-level">${label} ${engineState.lessonIndex + 1} / ${engineState.totalLessons}</span>`; // Playground: just show title, no lesson count
elements.headerLevelPill.innerHTML = `<span class="header-module-name">${engineState.module.title}</span>`;
} else {
const label = t("lessonLabel");
elements.headerLevelPill.innerHTML = `<span class="header-module-name">${engineState.module.title}</span> <span class="header-level">${label} ${engineState.lessonIndex + 1} / ${engineState.totalLessons}</span>`;
}
elements.headerLevelPill.href = `#${engineState.module.id}/${engineState.lessonIndex}`; elements.headerLevelPill.href = `#${engineState.module.id}/${engineState.lessonIndex}`;
} }