feat: improve playground UX and fix undo/redo across lessons

- Add dice SVG icon for random template button
- Reset button now restores last loaded template in playground
- Clear editor history when switching lessons (prevents cross-lesson undo)
- Add playground link to goodbye lesson
- Center icon buttons with flexbox

🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
2026-01-16 02:28:12 +01:00
parent 8d67405cf1
commit 1f7f7bb027
6 changed files with 42 additions and 7 deletions

View File

@@ -183,7 +183,7 @@ export class CodeEditor {
}
/**
* Set editor value
* Set editor value (preserves history)
*/
setValue(value) {
if (!this.view) return;
@@ -197,6 +197,13 @@ export class CodeEditor {
});
}
/**
* Set editor value and clear history (for lesson switching)
*/
setValueAndClearHistory(value) {
this.init(value);
}
/**
* Set editor mode (html or css)
*/