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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user