From d8bf7fa398d6d928325be9b5c64ca24875bfeef8 Mon Sep 17 00:00:00 2001 From: Agando Date: Sat, 30 May 2026 18:01:51 +0200 Subject: auto: 2026-05-30_18:00 changes --- modules/ext/tutorial.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'modules/ext') 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]; -- cgit v1.2.3