aboutsummaryrefslogtreecommitdiff
path: root/modules/ext/tutorial.js
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-05-30 18:01:51 +0200
committerAgando <roduccomm@gmail.com>2026-05-30 18:01:51 +0200
commitd8bf7fa398d6d928325be9b5c64ca24875bfeef8 (patch)
tree49ee4b3586ad68c648d546e6831abc30d8576be5 /modules/ext/tutorial.js
parente3fb2d434c4f7317944b7c77781599528d766a39 (diff)
auto: 2026-05-30_18:00 changes
Diffstat (limited to 'modules/ext/tutorial.js')
-rw-r--r--modules/ext/tutorial.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/modules/ext/tutorial.js b/modules/ext/tutorial.js
index 8983322..af4f4fa 100644
--- a/modules/ext/tutorial.js
+++ b/modules/ext/tutorial.js
@@ -147,6 +147,10 @@ class TutorialModule {
/** Called by welcome modal to begin the tutorial */
startTutorial() {
+ // Close welcome modal if it's open
+ const modal = document.getElementById('welcome-modal');
+ if (modal) modal.style.display = 'none';
+
this._started = true;
this._completed = new Set();
this._activeIndex = 0;
@@ -232,6 +236,10 @@ class TutorialModule {
}
_showCompletion() {
+ // Guard: only fire once
+ if (this._completionFired) return;
+ this._completionFired = true;
+
this.terminal.print('');
this.terminal.print('🎉🎉🎉 CONGRATULATIONS! 🎉🎉🎉', 'success');
this.terminal.print('═'.repeat(40), 'success');
@@ -255,10 +263,12 @@ class TutorialModule {
}
_fireConfetti() {
- const emojis = ['🎉', '✨', '⭐', '🌟', '💫', '🎊', '🔷', '🟢', '🔶'];
+ const emojis = ['🎉', '✨', '⭐', '🌟', '💫'];
const container = document.body;
if (!container) return;
- for (let i = 0; i < 40; i++) {
+ // Remove any previous confetti first
+ document.querySelectorAll('.confetti-piece').forEach(el => el.remove());
+ for (let i = 0; i < 15; i++) {
const el = document.createElement('div');
el.className = 'confetti-piece';
el.textContent = emojis[i % emojis.length];