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) {
|
||||
|
||||
@@ -32,9 +32,7 @@
|
||||
<section class="instructions">
|
||||
<h2 id="lesson-title"></h2>
|
||||
<div class="task-instruction" id="task-instruction"></div>
|
||||
<div class="lesson-description" id="lesson-description" data-i18n="selectLesson">
|
||||
Please select a lesson to begin.
|
||||
</div>
|
||||
<div class="lesson-description" id="lesson-description"></div>
|
||||
</section>
|
||||
|
||||
<section class="editor-section">
|
||||
@@ -78,7 +76,7 @@
|
||||
<button id="prev-btn" class="btn" data-i18n="previous">Previous</button>
|
||||
<span class="module-pill" id="module-pill">
|
||||
<span class="module-name"></span>
|
||||
<span class="level-indicator" id="level-indicator">1 of 3</span>
|
||||
<span class="level-indicator" id="level-indicator"></span>
|
||||
</span>
|
||||
<button id="next-btn" class="btn btn-primary" data-i18n="next">Next</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user