tuanchris 5 месяцев назад
Родитель
Сommit
25646e8a15
4 измененных файлов с 11 добавлено и 12 удалено
  1. 1 1
      VERSION
  2. 0 5
      static/js/base.js
  3. 4 0
      static/js/index.js
  4. 6 6
      static/js/playlists.js

+ 1 - 1
VERSION

@@ -1 +1 @@
-3.0.4
+3.0.5

+ 0 - 5
static/js/base.js

@@ -121,11 +121,6 @@ function connectWebSocket() {
                     }
                 }
                 
-                // Show modal if pattern is playing and modal is hidden, but only if user hasn't dismissed it
-                if (data.data.current_file && data.data.is_running && !userDismissedModal) {
-                    setModalVisibility(true, false);
-                }
-                
                 // Reset userDismissedModal flag if no pattern is playing
                 if (!data.data.current_file || !data.data.is_running) {
                     userDismissedModal = false;

+ 4 - 0
static/js/index.js

@@ -954,6 +954,10 @@ function setupPreviewPanelEvents(pattern) {
             if (response.ok) {
                 showStatusMessage(`Running pattern: ${pattern.split('/').pop()}`, 'success');
                 hidePatternPreview();
+                // Show the preview modal when a pattern starts
+                if (typeof setModalVisibility === 'function') {
+                    setModalVisibility(true, false);
+                }
                 
             } else {
                 let errorMsg = data.detail || 'Failed to run pattern';

+ 6 - 6
static/js/playlists.js

@@ -1052,12 +1052,12 @@ async function runPlaylist() {
 
         if (response.ok) {
             showStatusMessage(`Started playlist: ${currentPlaylist}`, 'success');
-            // Show the preview modal
-            try {
-                if (window.openPlayerPreviewModal) {
-                    window.openPlayerPreviewModal();
-                }
-            } catch (e) {}
+            // Show the preview modal when a playlist starts
+            if (typeof setModalVisibility === 'function') {
+                setModalVisibility(true, false);
+            } else if (window.openPlayerPreviewModal) {
+                window.openPlayerPreviewModal();
+            }
         } else {
             let errorMsg = 'Failed to run playlist';
             let errorType = 'error';