From 02fa32bc53c7d6c5ef4d39d2afbb90cb8a6e26f6 Mon Sep 17 00:00:00 2001 From: fspecii Date: Wed, 4 Feb 2026 13:43:25 +0200 Subject: [PATCH] Add always-visible player, play button on sidebar thumbnail, and GitHub link - Player: Show minimal placeholder when no song is playing instead of hiding - RightSidebar: Add play button overlay on cover art thumbnail - Hover to reveal play/pause button - Click anywhere on cover to play - Shows pause icon when song is currently playing - SettingsModal: Add GitHub repo link for issues and feature requests --- App.tsx | 6 ++++++ components/Player.tsx | 14 ++++++++++++- components/RightSidebar.tsx | 29 +++++++++++++++++++++++--- components/SettingsModal.tsx | 40 ++++++++++++++++++++++++------------ 4 files changed, 72 insertions(+), 17 deletions(-) diff --git a/App.tsx b/App.tsx index 493acce..c69fdf9 100644 --- a/App.tsx +++ b/App.tsx @@ -959,6 +959,9 @@ export default function App() { onNavigateToSong={handleNavigateToSong} isLiked={selectedSong ? likedSongIds.has(selectedSong.id) : false} onToggleLike={toggleLike} + onPlay={playSong} + isPlaying={isPlaying} + currentSong={currentSong} /> )} @@ -1086,6 +1089,9 @@ export default function App() { onNavigateToSong={handleNavigateToSong} isLiked={selectedSong ? likedSongIds.has(selectedSong.id) : false} onToggleLike={toggleLike} + onPlay={playSong} + isPlaying={isPlaying} + currentSong={currentSong} /> diff --git a/components/Player.tsx b/components/Player.tsx index a5ed652..d80fb5d 100644 --- a/components/Player.tsx +++ b/components/Player.tsx @@ -75,7 +75,19 @@ export const Player: React.FC = ({ return () => window.removeEventListener('keydown', handleKeyDown); }, [isFullscreen]); - if (!currentSong) return null; + // Show minimal player when no song is playing + if (!currentSong) { + return ( +
+
+
+ +
+ Select a song to play +
+
+ ); + } const formatTime = (time: number) => { if (isNaN(time)) return "0:00"; diff --git a/components/RightSidebar.tsx b/components/RightSidebar.tsx index bd22b99..0b6efab 100644 --- a/components/RightSidebar.tsx +++ b/components/RightSidebar.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react'; import { Song } from '../types'; -import { Heart, Share2, Play, MoreHorizontal, X, Copy, Wand2, MoreVertical, Download, Repeat, Video, Music, Link as LinkIcon, Sparkles, Globe, Lock, Trash2, Edit3, Layers } from 'lucide-react'; +import { Heart, Share2, Play, Pause, MoreHorizontal, X, Copy, Wand2, MoreVertical, Download, Repeat, Video, Music, Link as LinkIcon, Sparkles, Globe, Lock, Trash2, Edit3, Layers } from 'lucide-react'; import { songsApi } from '../services/api'; import { useAuth } from '../context/AuthContext'; import { SongDropdownMenu } from './SongDropdownMenu'; @@ -19,9 +19,12 @@ interface RightSidebarProps { onToggleLike?: (song: Song) => void; onDelete?: (song: Song) => void; onAddToPlaylist?: (song: Song) => void; + onPlay?: (song: Song) => void; + isPlaying?: boolean; + currentSong?: Song | null; } -export const RightSidebar: React.FC = ({ song, onClose, onOpenVideo, onReuse, onSongUpdate, onNavigateToProfile, onNavigateToSong, isLiked, onToggleLike, onDelete, onAddToPlaylist }) => { +export const RightSidebar: React.FC = ({ song, onClose, onOpenVideo, onReuse, onSongUpdate, onNavigateToProfile, onNavigateToSong, isLiked, onToggleLike, onDelete, onAddToPlaylist, onPlay, isPlaying, currentSong }) => { const { token, user } = useAuth(); const [showMenu, setShowMenu] = useState(false); const [isOwner, setIsOwner] = useState(false); @@ -64,7 +67,10 @@ export const RightSidebar: React.FC = ({ song, onClose, onOpe
{/* Cover Art */} -
+
onPlay?.(song)} + > {song.coverUrl ? ( {song.title} { e.currentTarget.style.display = 'none'; }} /> ) : null} @@ -73,6 +79,23 @@ export const RightSidebar: React.FC = ({ song, onClose, onOpe {/* Overlay Gradient */}
+ {/* Play Button Overlay */} +
+ +
+
diff --git a/components/SettingsModal.tsx b/components/SettingsModal.tsx index 3d74e4d..0f61b8c 100644 --- a/components/SettingsModal.tsx +++ b/components/SettingsModal.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { X, User as UserIcon, Palette, Info, Edit3, ExternalLink } from 'lucide-react'; +import { X, User as UserIcon, Palette, Info, Edit3, ExternalLink, Github } from 'lucide-react'; import { useAuth } from '../context/AuthContext'; import { EditProfileModal } from './EditProfileModal'; @@ -144,18 +144,32 @@ export const SettingsModal: React.FC = ({ isOpen, onClose, t Powered by ACE-Step 1.5. Open source and free to use.

-

Created by Ambsd

- - - - - Follow @AmbsdOP - +

Created by Ambsd

+ +

+ Report issues or request features on GitHub +