2026-01-26 18:18:52 +00:00
|
|
|
import { usePlayerStore } from '../store/playerStore';
|
2026-02-08 21:48:08 +00:00
|
|
|
import { useUIStore } from '@/stores/ui';
|
2026-01-26 18:18:52 +00:00
|
|
|
import { cn } from '@/lib/utils';
|
feat(release): v0.202 — Lots G, H, F, C, D
- Lot G: Recherche avancée (musical_key, tri pertinence, autocomplete, facettes, historique)
- Lot H: Analytics créateur (stats, charts, completion rate, export CSV/JSON)
- Lot F: Seller dashboard (GET /sell/stats, liste produits)
- Lot C: Player (crossfade, gapless preload, PiP)
- Lot D2: Autoplay (GET /tracks/recommendations, section À écouter ensuite)
Backend: GetRecommendations handler, route /tracks/recommendations
Frontend: PlayerQueue recommendations, fix TS errors (GlobalPlayer, AnalyticsViewKpiGrid, etc.)
Docs: FEATURE_STATUS, PROJECT_STATE, CHANGELOG, SCOPE_CONTROL
2026-02-20 17:16:17 +00:00
|
|
|
import { X, GripVertical, ListMusic, Sparkles } from 'lucide-react';
|
2026-01-26 18:18:52 +00:00
|
|
|
import { Badge } from '@/components/ui/badge';
|
|
|
|
|
import { ScrollArea } from '@/components/ui/scroll-area';
|
2026-02-08 23:00:21 +00:00
|
|
|
import { EmptyState } from '@/components/ui/empty-state';
|
feat(release): v0.202 — Lots G, H, F, C, D
- Lot G: Recherche avancée (musical_key, tri pertinence, autocomplete, facettes, historique)
- Lot H: Analytics créateur (stats, charts, completion rate, export CSV/JSON)
- Lot F: Seller dashboard (GET /sell/stats, liste produits)
- Lot C: Player (crossfade, gapless preload, PiP)
- Lot D2: Autoplay (GET /tracks/recommendations, section À écouter ensuite)
Backend: GetRecommendations handler, route /tracks/recommendations
Frontend: PlayerQueue recommendations, fix TS errors (GlobalPlayer, AnalyticsViewKpiGrid, etc.)
Docs: FEATURE_STATUS, PROJECT_STATE, CHANGELOG, SCOPE_CONTROL
2026-02-20 17:16:17 +00:00
|
|
|
import { useQuery } from '@tanstack/react-query';
|
|
|
|
|
import { useAuthStore } from '@/features/auth/store/authStore';
|
|
|
|
|
import { tracksApi } from '@/services/api/tracks';
|
|
|
|
|
import { getHLSMasterPlaylistURL } from '@/features/streaming/services/hlsService';
|
|
|
|
|
import type { Track as PlayerTrack } from '../types';
|
|
|
|
|
import type { Track as ApiTrack } from '@/features/tracks/types/track';
|
2026-01-26 18:18:52 +00:00
|
|
|
|
|
|
|
|
interface PlayerQueueProps {
|
|
|
|
|
isOpen: boolean;
|
|
|
|
|
onClose: () => void;
|
|
|
|
|
currentTrackId?: string;
|
|
|
|
|
onPlay: (track: any) => void;
|
|
|
|
|
}
|
|
|
|
|
|
feat(release): v0.202 — Lots G, H, F, C, D
- Lot G: Recherche avancée (musical_key, tri pertinence, autocomplete, facettes, historique)
- Lot H: Analytics créateur (stats, charts, completion rate, export CSV/JSON)
- Lot F: Seller dashboard (GET /sell/stats, liste produits)
- Lot C: Player (crossfade, gapless preload, PiP)
- Lot D2: Autoplay (GET /tracks/recommendations, section À écouter ensuite)
Backend: GetRecommendations handler, route /tracks/recommendations
Frontend: PlayerQueue recommendations, fix TS errors (GlobalPlayer, AnalyticsViewKpiGrid, etc.)
Docs: FEATURE_STATUS, PROJECT_STATE, CHANGELOG, SCOPE_CONTROL
2026-02-20 17:16:17 +00:00
|
|
|
function mapApiTrackToPlayerTrack(t: ApiTrack): PlayerTrack {
|
|
|
|
|
const apiTrack = t as ApiTrack & { stream_manifest_url?: string; cover_art_path?: string };
|
|
|
|
|
return {
|
|
|
|
|
id: t.id,
|
|
|
|
|
title: t.title,
|
|
|
|
|
artist: t.artist,
|
|
|
|
|
duration: t.duration ?? 0,
|
|
|
|
|
url: apiTrack.stream_manifest_url ?? getHLSMasterPlaylistURL(t.id),
|
|
|
|
|
cover: apiTrack.cover_art_path,
|
|
|
|
|
genre: t.genre,
|
|
|
|
|
like_count: t.like_count,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-12 23:32:08 +00:00
|
|
|
export function PlayerQueue({ isOpen, onClose, onPlay }: PlayerQueueProps) {
|
2026-01-26 18:18:52 +00:00
|
|
|
const { queue, currentIndex, removeFromQueue, clearQueue } = usePlayerStore();
|
2026-02-08 21:48:08 +00:00
|
|
|
const { sidebarOpen } = useUIStore();
|
feat(release): v0.202 — Lots G, H, F, C, D
- Lot G: Recherche avancée (musical_key, tri pertinence, autocomplete, facettes, historique)
- Lot H: Analytics créateur (stats, charts, completion rate, export CSV/JSON)
- Lot F: Seller dashboard (GET /sell/stats, liste produits)
- Lot C: Player (crossfade, gapless preload, PiP)
- Lot D2: Autoplay (GET /tracks/recommendations, section À écouter ensuite)
Backend: GetRecommendations handler, route /tracks/recommendations
Frontend: PlayerQueue recommendations, fix TS errors (GlobalPlayer, AnalyticsViewKpiGrid, etc.)
Docs: FEATURE_STATUS, PROJECT_STATE, CHANGELOG, SCOPE_CONTROL
2026-02-20 17:16:17 +00:00
|
|
|
const isAuthenticated = useAuthStore((s) => s.isAuthenticated);
|
|
|
|
|
const { data: recommendations = [], isLoading: recommendationsLoading } = useQuery({
|
|
|
|
|
queryKey: ['track-recommendations'],
|
|
|
|
|
queryFn: () => tracksApi.getRecommendations({ limit: 10 }),
|
|
|
|
|
enabled: isOpen && isAuthenticated && queue.length === 0,
|
|
|
|
|
staleTime: 60_000,
|
|
|
|
|
});
|
|
|
|
|
const playerTracks = recommendations.map(mapApiTrackToPlayerTrack);
|
2026-01-26 18:18:52 +00:00
|
|
|
|
|
|
|
|
if (!isOpen) return null;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
|
className={cn(
|
2026-02-12 01:09:29 +00:00
|
|
|
"fixed bottom-24 left-4 right-4 z-40 transition-all duration-[var(--sumi-duration-normal)] ease-[var(--sumi-ease-out)] transform",
|
2026-02-08 21:48:08 +00:00
|
|
|
sidebarOpen ? "lg:left-main-expanded" : "lg:left-main-collapsed",
|
|
|
|
|
"lg:right-4",
|
2026-01-26 18:18:52 +00:00
|
|
|
isOpen ? "translate-y-0 opacity-100" : "translate-y-10 opacity-0 pointer-events-none"
|
|
|
|
|
)}
|
|
|
|
|
>
|
2026-02-08 21:48:08 +00:00
|
|
|
<div className="max-w-4xl mx-auto bg-black/80 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl overflow-hidden max-h-layout-drawer flex flex-col">
|
2026-01-26 18:18:52 +00:00
|
|
|
{/* Header */}
|
|
|
|
|
<div className="flex items-center justify-between p-4 border-b border-white/5 bg-white/5">
|
|
|
|
|
<div className="flex items-center gap-2">
|
refactor: Phase 6 — Migrate feature modules to SUMI tokens
- auth: Replace gray-* with muted/border tokens, text-foreground
- settings: TwoFactorSettings + NotificationSettings text-foreground
- chat: ChatInput, ConversationItem, ChatPage — text-foreground,
remove kodo references
- player: PlayerExpanded, PlayerQueue, PlayerControls — text-foreground,
remove cyan/magenta gradients
- playlists: All components — text-foreground for badges/headings
- tracks: TrackCard, TrackListRow — text-foreground, remove glow effects
- studio: FileGridCard — text-foreground
- library: LibraryPageGrid — remove hover-glow-cyan, shadow-card-glow-cyan
- profile: UserProfilePageHeader — text-foreground
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 01:06:28 +00:00
|
|
|
<h3 className="text-foreground font-bold font-heading tracking-wide">Play Queue</h3>
|
2026-02-12 23:32:08 +00:00
|
|
|
<Badge variant="secondary" className="border-primary/20 text-primary bg-primary/10">
|
2026-01-26 18:18:52 +00:00
|
|
|
{queue.length} Tracks
|
|
|
|
|
</Badge>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<button
|
|
|
|
|
onClick={clearQueue}
|
refactor: Phase 6 — Migrate feature modules to SUMI tokens
- auth: Replace gray-* with muted/border tokens, text-foreground
- settings: TwoFactorSettings + NotificationSettings text-foreground
- chat: ChatInput, ConversationItem, ChatPage — text-foreground,
remove kodo references
- player: PlayerExpanded, PlayerQueue, PlayerControls — text-foreground,
remove cyan/magenta gradients
- playlists: All components — text-foreground for badges/headings
- tracks: TrackCard, TrackListRow — text-foreground, remove glow effects
- studio: FileGridCard — text-foreground
- library: LibraryPageGrid — remove hover-glow-cyan, shadow-card-glow-cyan
- profile: UserProfilePageHeader — text-foreground
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 01:06:28 +00:00
|
|
|
className="px-3 py-1.5 text-xs text-muted-foreground hover:text-foreground hover:bg-white/10 rounded-md transition-colors duration-[var(--duration-fast)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
2026-01-26 18:18:52 +00:00
|
|
|
>
|
|
|
|
|
Clear
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
onClick={onClose}
|
refactor: Phase 6 — Migrate feature modules to SUMI tokens
- auth: Replace gray-* with muted/border tokens, text-foreground
- settings: TwoFactorSettings + NotificationSettings text-foreground
- chat: ChatInput, ConversationItem, ChatPage — text-foreground,
remove kodo references
- player: PlayerExpanded, PlayerQueue, PlayerControls — text-foreground,
remove cyan/magenta gradients
- playlists: All components — text-foreground for badges/headings
- tracks: TrackCard, TrackListRow — text-foreground, remove glow effects
- studio: FileGridCard — text-foreground
- library: LibraryPageGrid — remove hover-glow-cyan, shadow-card-glow-cyan
- profile: UserProfilePageHeader — text-foreground
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 01:06:28 +00:00
|
|
|
className="p-1.5 text-muted-foreground hover:text-foreground hover:bg-white/10 rounded-full transition-colors duration-[var(--duration-fast)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
2026-01-26 18:18:52 +00:00
|
|
|
>
|
|
|
|
|
<X className="w-5 h-5" />
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Content */}
|
|
|
|
|
<div className="flex-1 overflow-hidden relative">
|
|
|
|
|
{queue.length === 0 ? (
|
feat(release): v0.202 — Lots G, H, F, C, D
- Lot G: Recherche avancée (musical_key, tri pertinence, autocomplete, facettes, historique)
- Lot H: Analytics créateur (stats, charts, completion rate, export CSV/JSON)
- Lot F: Seller dashboard (GET /sell/stats, liste produits)
- Lot C: Player (crossfade, gapless preload, PiP)
- Lot D2: Autoplay (GET /tracks/recommendations, section À écouter ensuite)
Backend: GetRecommendations handler, route /tracks/recommendations
Frontend: PlayerQueue recommendations, fix TS errors (GlobalPlayer, AnalyticsViewKpiGrid, etc.)
Docs: FEATURE_STATUS, PROJECT_STATE, CHANGELOG, SCOPE_CONTROL
2026-02-20 17:16:17 +00:00
|
|
|
<div className="flex flex-col gap-4 p-4">
|
|
|
|
|
{playerTracks.length > 0 ? (
|
|
|
|
|
<>
|
|
|
|
|
<h4 className="text-sm font-medium text-muted-foreground flex items-center gap-2">
|
|
|
|
|
<Sparkles className="w-4 h-4 text-primary" />
|
|
|
|
|
À écouter ensuite
|
|
|
|
|
</h4>
|
|
|
|
|
<ScrollArea className="max-h-layout-list">
|
|
|
|
|
<div className="space-y-1">
|
|
|
|
|
{playerTracks.map((track) => (
|
|
|
|
|
<div
|
|
|
|
|
key={track.id}
|
|
|
|
|
className="group flex items-center gap-3 p-2 rounded-lg hover:bg-white/5 transition-colors cursor-pointer border border-transparent hover:border-white/5"
|
|
|
|
|
onClick={() => onPlay(track)}
|
|
|
|
|
>
|
|
|
|
|
<div className="w-6 text-center text-xs font-mono text-muted-foreground">—</div>
|
|
|
|
|
<div className="flex-1 min-w-0">
|
|
|
|
|
<h4 className="text-sm font-medium truncate text-foreground">{track.title}</h4>
|
|
|
|
|
<p className="text-xs text-muted-foreground truncate">{track.artist}</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
</ScrollArea>
|
|
|
|
|
<p className="text-xs text-muted-foreground">Cliquez pour lire</p>
|
|
|
|
|
</>
|
|
|
|
|
) : recommendationsLoading ? (
|
|
|
|
|
<div className="flex items-center justify-center py-8 text-muted-foreground text-sm">Chargement des suggestions…</div>
|
|
|
|
|
) : (
|
|
|
|
|
<EmptyState
|
|
|
|
|
icon={<ListMusic className="w-full h-full" />}
|
|
|
|
|
title="Your queue is empty"
|
|
|
|
|
description="Add tracks to keep the vibe going."
|
|
|
|
|
size="sm"
|
|
|
|
|
className="border-0 shadow-none bg-transparent"
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
2026-01-26 18:18:52 +00:00
|
|
|
) : (
|
feat(web): UI premium Discord/Spotify-like — tokens, shadows, focus, layout
Plan UI premium 6–8 semaines (design system, shell, Storybook, a11y):
- Design system: DESIGN_TOKENS.md, APP_SHELL.md, FULL_LAYOUT_PAGE.md. Single source
for layout/shell (index.css), shadows (design-system.css), durations/easing.
- Tokens: shadow-cover-depth, shadow-gold-glow, shadow-fab-glow; layout max-height
(max-h-layout-drawer, max-h-layout-panel, max-h-layout-list). All duration-200/300/500
replaced by --duration-fast/normal/slow. Arbitrary shadows replaced by token classes.
- Shell & player: Sidebar, Header, GlobalPlayer, MiniPlayer, PlayerQueue, PlayerControls,
AudioPlayer use tokens; focus-visible on Sidebar, PlayerQueue, DropdownMenuTrigger/Item,
TabsTrigger. Typography: text-[10px]/[9px] → text-xs where applicable.
- ESLint: no-restricted-syntax (warn) for w-/h-/rounded-/shadow-/text-/spacing arbitrary.
- Scripts: report-arbitrary-values.mjs, capture/compare/generate visual; visual-complete.spec.ts.
- Stories full layout: Dashboard, Playlists, Library, Settings, Profile in DashboardLayout.stories.
- .cursorrules + README: DESIGN_TOKENS, APP_SHELL, visual commands, no arbitrary without justification.
- apps/web/.gitignore: e2e test artifacts (test-results-visual, playwright-report-visual).
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 16:15:58 +00:00
|
|
|
<ScrollArea className="h-full max-h-layout-list">
|
2026-01-26 18:18:52 +00:00
|
|
|
<div className="p-2 space-y-1">
|
|
|
|
|
{queue.map((track, index) => {
|
|
|
|
|
const isCurrent = index === currentIndex;
|
|
|
|
|
const isPast = index < currentIndex;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
|
key={`${track.id}-${index}`}
|
|
|
|
|
className={cn(
|
feat(web): UI premium Discord/Spotify-like — tokens, shadows, focus, layout
Plan UI premium 6–8 semaines (design system, shell, Storybook, a11y):
- Design system: DESIGN_TOKENS.md, APP_SHELL.md, FULL_LAYOUT_PAGE.md. Single source
for layout/shell (index.css), shadows (design-system.css), durations/easing.
- Tokens: shadow-cover-depth, shadow-gold-glow, shadow-fab-glow; layout max-height
(max-h-layout-drawer, max-h-layout-panel, max-h-layout-list). All duration-200/300/500
replaced by --duration-fast/normal/slow. Arbitrary shadows replaced by token classes.
- Shell & player: Sidebar, Header, GlobalPlayer, MiniPlayer, PlayerQueue, PlayerControls,
AudioPlayer use tokens; focus-visible on Sidebar, PlayerQueue, DropdownMenuTrigger/Item,
TabsTrigger. Typography: text-[10px]/[9px] → text-xs where applicable.
- ESLint: no-restricted-syntax (warn) for w-/h-/rounded-/shadow-/text-/spacing arbitrary.
- Scripts: report-arbitrary-values.mjs, capture/compare/generate visual; visual-complete.spec.ts.
- Stories full layout: Dashboard, Playlists, Library, Settings, Profile in DashboardLayout.stories.
- .cursorrules + README: DESIGN_TOKENS, APP_SHELL, visual commands, no arbitrary without justification.
- apps/web/.gitignore: e2e test artifacts (test-results-visual, playwright-report-visual).
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 16:15:58 +00:00
|
|
|
"group flex items-center gap-3 p-2 rounded-lg transition-all duration-[var(--duration-fast)] border border-transparent",
|
2026-01-26 18:18:52 +00:00
|
|
|
isCurrent
|
feat(web): UI premium Discord/Spotify-like — tokens, shadows, focus, layout
Plan UI premium 6–8 semaines (design system, shell, Storybook, a11y):
- Design system: DESIGN_TOKENS.md, APP_SHELL.md, FULL_LAYOUT_PAGE.md. Single source
for layout/shell (index.css), shadows (design-system.css), durations/easing.
- Tokens: shadow-cover-depth, shadow-gold-glow, shadow-fab-glow; layout max-height
(max-h-layout-drawer, max-h-layout-panel, max-h-layout-list). All duration-200/300/500
replaced by --duration-fast/normal/slow. Arbitrary shadows replaced by token classes.
- Shell & player: Sidebar, Header, GlobalPlayer, MiniPlayer, PlayerQueue, PlayerControls,
AudioPlayer use tokens; focus-visible on Sidebar, PlayerQueue, DropdownMenuTrigger/Item,
TabsTrigger. Typography: text-[10px]/[9px] → text-xs where applicable.
- ESLint: no-restricted-syntax (warn) for w-/h-/rounded-/shadow-/text-/spacing arbitrary.
- Scripts: report-arbitrary-values.mjs, capture/compare/generate visual; visual-complete.spec.ts.
- Stories full layout: Dashboard, Playlists, Library, Settings, Profile in DashboardLayout.stories.
- .cursorrules + README: DESIGN_TOKENS, APP_SHELL, visual commands, no arbitrary without justification.
- apps/web/.gitignore: e2e test artifacts (test-results-visual, playwright-report-visual).
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 16:15:58 +00:00
|
|
|
? "bg-primary/10 border-primary/20 shadow-queue-item-current"
|
2026-01-26 18:18:52 +00:00
|
|
|
: "hover:bg-white/5 hover:border-white/5",
|
|
|
|
|
isPast && "opacity-50"
|
|
|
|
|
)}
|
|
|
|
|
>
|
|
|
|
|
{/* Drag Handle (Simulated) */}
|
|
|
|
|
<div className="text-white/20 group-hover:text-white/40 cursor-grab px-1">
|
|
|
|
|
<GripVertical className="w-4 h-4" />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Number/Status */}
|
|
|
|
|
<div className="w-6 text-center text-xs font-mono text-muted-foreground">
|
|
|
|
|
{isCurrent ? (
|
feat(web): UI premium Discord/Spotify-like — tokens, shadows, focus, layout
Plan UI premium 6–8 semaines (design system, shell, Storybook, a11y):
- Design system: DESIGN_TOKENS.md, APP_SHELL.md, FULL_LAYOUT_PAGE.md. Single source
for layout/shell (index.css), shadows (design-system.css), durations/easing.
- Tokens: shadow-cover-depth, shadow-gold-glow, shadow-fab-glow; layout max-height
(max-h-layout-drawer, max-h-layout-panel, max-h-layout-list). All duration-200/300/500
replaced by --duration-fast/normal/slow. Arbitrary shadows replaced by token classes.
- Shell & player: Sidebar, Header, GlobalPlayer, MiniPlayer, PlayerQueue, PlayerControls,
AudioPlayer use tokens; focus-visible on Sidebar, PlayerQueue, DropdownMenuTrigger/Item,
TabsTrigger. Typography: text-[10px]/[9px] → text-xs where applicable.
- ESLint: no-restricted-syntax (warn) for w-/h-/rounded-/shadow-/text-/spacing arbitrary.
- Scripts: report-arbitrary-values.mjs, capture/compare/generate visual; visual-complete.spec.ts.
- Stories full layout: Dashboard, Playlists, Library, Settings, Profile in DashboardLayout.stories.
- .cursorrules + README: DESIGN_TOKENS, APP_SHELL, visual commands, no arbitrary without justification.
- apps/web/.gitignore: e2e test artifacts (test-results-visual, playwright-report-visual).
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 16:15:58 +00:00
|
|
|
<div className="w-2 h-2 rounded-full bg-primary mx-auto animate-pulse shadow-queue-item-current" />
|
2026-01-26 18:18:52 +00:00
|
|
|
) : (
|
|
|
|
|
index + 1
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Info */}
|
|
|
|
|
<div
|
|
|
|
|
className="flex-1 min-w-0 cursor-pointer"
|
|
|
|
|
onClick={() => !isCurrent && onPlay(track)}
|
|
|
|
|
>
|
|
|
|
|
<h4 className={cn(
|
|
|
|
|
"text-sm font-medium truncate transition-colors",
|
refactor: Phase 6 — Migrate feature modules to SUMI tokens
- auth: Replace gray-* with muted/border tokens, text-foreground
- settings: TwoFactorSettings + NotificationSettings text-foreground
- chat: ChatInput, ConversationItem, ChatPage — text-foreground,
remove kodo references
- player: PlayerExpanded, PlayerQueue, PlayerControls — text-foreground,
remove cyan/magenta gradients
- playlists: All components — text-foreground for badges/headings
- tracks: TrackCard, TrackListRow — text-foreground, remove glow effects
- studio: FileGridCard — text-foreground
- library: LibraryPageGrid — remove hover-glow-cyan, shadow-card-glow-cyan
- profile: UserProfilePageHeader — text-foreground
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 01:06:28 +00:00
|
|
|
isCurrent ? "text-primary" : "text-foreground group-hover:text-foreground"
|
2026-01-26 18:18:52 +00:00
|
|
|
)}>
|
|
|
|
|
{track.title}
|
|
|
|
|
</h4>
|
|
|
|
|
<p className="text-xs text-muted-foreground truncate opacity-70 group-hover:opacity-100">
|
|
|
|
|
{track.artist}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Actions */}
|
|
|
|
|
<button
|
|
|
|
|
onClick={(e) => {
|
|
|
|
|
e.stopPropagation();
|
|
|
|
|
removeFromQueue(index);
|
|
|
|
|
}}
|
2026-02-08 22:26:34 +00:00
|
|
|
className="opacity-0 group-hover:opacity-100 p-2 text-muted-foreground hover:text-destructive hover:bg-destructive/10 rounded-full transition-all duration-[var(--duration-fast)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
2026-01-26 18:18:52 +00:00
|
|
|
>
|
|
|
|
|
<X className="w-3 h-3" />
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</div>
|
|
|
|
|
</ScrollArea>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Backdrop for explicit dismissal on mobile if needed */}
|
|
|
|
|
<div
|
|
|
|
|
className="fixed inset-0 bg-black/20 -z-10 backdrop-blur-sm md:hidden"
|
|
|
|
|
onClick={onClose}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|