diff --git a/src/components/Navigation/Navigation.tsx b/src/components/Navigation/Navigation.tsx index 92f5e1c..907be27 100644 --- a/src/components/Navigation/Navigation.tsx +++ b/src/components/Navigation/Navigation.tsx @@ -128,7 +128,7 @@ const Navigation: React.FC = () => { {/* Player Controls */}
- +
); @@ -184,7 +184,7 @@ const Navigation: React.FC = () => { {/* Player Controls for Mobile */}
- +
diff --git a/src/components/common/PlayerControls.tsx b/src/components/common/PlayerControls.tsx index 4f127eb..dbeb24a 100644 --- a/src/components/common/PlayerControls.tsx +++ b/src/components/common/PlayerControls.tsx @@ -1,19 +1,20 @@ import React from 'react'; import { IonCard, IonCardContent, IonChip, IonIcon } from '@ionic/react'; -import { play, pause, stop } from 'ionicons/icons'; -import { useAppSelector } from '../../redux'; -import { selectIsAdmin, selectPlayerState, selectQueueLength, selectControllerName } from '../../redux'; -import { playerService } from '../../firebase/services'; -import { PlayerState } from '../../types'; +import { play, pause, stop, settingsOutline, pauseOutline, playOutline, stopOutline } from 'ionicons/icons'; import ActionButton from './ActionButton'; -import { useToast } from '../../hooks/useToast'; +import { useAppSelector } from '../../redux'; +import { selectPlayerState, selectIsAdmin, selectQueueLength, selectControllerName } from '../../redux'; +import { playerService } from '../../firebase/services'; import { debugLog } from '../../utils/logger'; +import { useToast } from '../../hooks/useToast'; +import { PlayerState } from '../../types'; interface PlayerControlsProps { className?: string; + variant?: 'light' | 'dark'; } -const PlayerControls: React.FC = ({ className = '' }) => { +const PlayerControls: React.FC = ({ className = '', variant = 'light' }) => { const isAdmin = useAppSelector(selectIsAdmin); const playerState = useAppSelector(selectPlayerState); const queueLength = useAppSelector(selectQueueLength); @@ -83,6 +84,96 @@ const PlayerControls: React.FC = ({ className = '' }) => { } }; + const getStatusText = () => { + switch (currentState) { + case PlayerState.playing: + return 'Currently Playing'; + case PlayerState.paused: + return 'Currently Paused'; + default: + return 'Currently Stopped'; + } + }; + + // Dark mode variant + if (variant === 'dark') { + return ( +
+ {/* Status Text */} +
+ + {getStatusText()} + +
+ + {/* Control Buttons */} + {currentState === PlayerState.playing ? ( +
+ + Pause +
+ ) : ( +
+ + Play +
+ )} + + {currentState !== PlayerState.stopped && ( +
+ + Stop +
+ )} + + {!hasSongsInQueue && ( +
+ Add songs to queue to enable playback controls +
+ )} +
+ ); + } + return (