diff --git a/src/static/dashboard.html b/src/static/dashboard.html
index 67d4a46..413aea8 100644
--- a/src/static/dashboard.html
+++ b/src/static/dashboard.html
@@ -764,7 +764,7 @@
-
+
diff --git a/src/static/js/tutorial.js b/src/static/js/tutorial.js
index 5ff7103..e2c9843 100644
--- a/src/static/js/tutorial.js
+++ b/src/static/js/tutorial.js
@@ -496,12 +496,37 @@ const Tutorial = {
// Sichere Demo-Ausfuehrung: Faengt Fehler ab und stellt Navigation sicher
_runDemo(fn) {
var self = this;
- fn.call(this).catch(function(e) {
+ var finished = false;
+ function done() {
+ if (finished) return;
+ finished = true;
self._hideCursor();
- self._clearSubHighlights();
self._demoRunning = false;
self._enableNavAfterDemo();
- });
+ }
+ // Fallback-Timeout: Nach 30s wird Demo auf jeden Fall beendet
+ var fallback = setTimeout(done, 30000);
+ try {
+ var result = fn.call(this);
+ if (result && typeof result.then === 'function') {
+ result.then(function() {
+ clearTimeout(fallback);
+ // Demo-Methode hat _enableNavAfterDemo selbst aufgerufen,
+ // aber falls nicht, machen wir es hier
+ if (self._demoRunning) done();
+ }).catch(function(e) {
+ clearTimeout(fallback);
+ done();
+ });
+ } else {
+ // Synchron beendet
+ clearTimeout(fallback);
+ if (self._demoRunning) done();
+ }
+ } catch(e) {
+ clearTimeout(fallback);
+ done();
+ }
},
// -----------------------------------------------------------------------