소스 검색

Fix NowPlayingBar closing during countdown between patterns

The bar was hiding during the pause between patterns because
current_playing_file is set to None for MQTT idle state reporting.
Added pause_time_remaining > 0 check to keep bar visible during countdown.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
tuanchris 23 시간 전
부모
커밋
44fe9049a2
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      frontend/src/components/layout/Layout.tsx

+ 2 - 1
frontend/src/components/layout/Layout.tsx

@@ -307,7 +307,8 @@ export function Layout() {
             const currentFile = data.data.current_file || null
             const currentFile = data.data.current_file || null
             setCurrentPlayingFile(currentFile)
             setCurrentPlayingFile(currentFile)
 
 
-            const isPlaying = Boolean(currentFile) || Boolean(data.data.is_running) || Boolean(data.data.is_paused)
+            // Include pause_time_remaining to keep bar visible during countdown between patterns
+            const isPlaying = Boolean(currentFile) || Boolean(data.data.is_running) || Boolean(data.data.is_paused) || (data.data.pause_time_remaining ?? 0) > 0
             // Skip auto-open on first message (page refresh) - only react to state changes
             // Skip auto-open on first message (page refresh) - only react to state changes
             if (wasPlayingRef.current !== null) {
             if (wasPlayingRef.current !== null) {
               if (isPlaying && !wasPlayingRef.current) {
               if (isPlaying && !wasPlayingRef.current) {