fix: remove all placeholder text, cache level indicator

- Remove "Please select a lesson" default text
- Remove "1 of 3" default level indicator
- Add level indicator to lesson cache for instant restore
This commit is contained in:
2025-12-30 20:54:57 +01:00
parent e0f5fbc45c
commit 109c2fadcf
2 changed files with 7 additions and 5 deletions

View File

@@ -227,6 +227,9 @@ function restoreLessonCache() {
if (data.taskInstruction && elements.taskInstruction) {
elements.taskInstruction.innerHTML = data.taskInstruction;
}
if (data.levelIndicator && elements.levelIndicator) {
elements.levelIndicator.innerHTML = data.levelIndicator;
}
}
} catch (e) {
// Ignore cache errors
@@ -443,7 +446,8 @@ function loadCurrentLesson() {
moduleTitle: engineState.module?.title,
lessonTitle: lesson.title,
lessonDescription: lesson.description,
taskInstruction: lesson.task
taskInstruction: lesson.task,
levelIndicator: elements.levelIndicator?.innerHTML
})
);
} catch (e) {