Signed-off-by: mbrucedogs <mbrucedogs@gmail.com>
This commit is contained in:
parent
e480fe4828
commit
cef20f59c5
@ -87,6 +87,9 @@ const PlayerControls: React.FC<PlayerControlsProps> = ({ className = '', variant
|
||||
};
|
||||
|
||||
const getStatusText = () => {
|
||||
if (!hasSongsInQueue) {
|
||||
return 'No songs in queue';
|
||||
}
|
||||
switch (currentState) {
|
||||
case PlayerState.playing:
|
||||
return 'Currently Playing';
|
||||
@ -113,8 +116,9 @@ const PlayerControls: React.FC<PlayerControlsProps> = ({ className = '', variant
|
||||
{getStatusText()}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Control Buttons */}
|
||||
{hasSongsInQueue && (
|
||||
<>
|
||||
{currentState === PlayerState.playing ? (
|
||||
<div
|
||||
className="flex items-center cursor-pointer hover:bg-gray-800"
|
||||
@ -146,7 +150,6 @@ const PlayerControls: React.FC<PlayerControlsProps> = ({ className = '', variant
|
||||
<span style={{ fontWeight: '500' }}>Play</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{currentState !== PlayerState.stopped && (
|
||||
<div
|
||||
className="flex items-center cursor-pointer hover:bg-gray-800"
|
||||
@ -163,12 +166,10 @@ const PlayerControls: React.FC<PlayerControlsProps> = ({ className = '', variant
|
||||
<span style={{ fontWeight: '500' }}>Stop</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
</>
|
||||
)}
|
||||
{!hasSongsInQueue && (
|
||||
<div style={{
|
||||
padding: '12px 0px',
|
||||
marginLeft: '32px' // Align with text after icon
|
||||
}} className="text-xs text-gray-400">
|
||||
<div style={{ padding: '12px 0px', marginLeft: 0 }} className="text-xs text-gray-400">
|
||||
Add songs to queue to enable playback controls
|
||||
</div>
|
||||
)}
|
||||
@ -187,7 +188,8 @@ const PlayerControls: React.FC<PlayerControlsProps> = ({ className = '', variant
|
||||
</IonChip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Only show controls if there are songs in the queue */}
|
||||
{hasSongsInQueue && (
|
||||
<div className="mt-4 flex items-center justify-center space-x-3">
|
||||
{currentState === PlayerState.playing ? (
|
||||
<ActionButton
|
||||
@ -207,7 +209,6 @@ const PlayerControls: React.FC<PlayerControlsProps> = ({ className = '', variant
|
||||
disabled={!hasSongsInQueue}
|
||||
/>
|
||||
)}
|
||||
|
||||
{currentState !== PlayerState.stopped && (
|
||||
<ActionButton
|
||||
onClick={handleStop}
|
||||
@ -218,11 +219,11 @@ const PlayerControls: React.FC<PlayerControlsProps> = ({ className = '', variant
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
)}
|
||||
<div className="mt-3 text-xs text-center">
|
||||
Admin controls - Only visible to admin users
|
||||
{!hasSongsInQueue && (
|
||||
<div className="mt-1 text-orange-600">
|
||||
<div className="mt-1 text-orange-600" style={{ marginLeft: 0 }}>
|
||||
Add songs to queue to enable playback controls
|
||||
</div>
|
||||
)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user