Compare commits
1
Commits
@@ -76,8 +76,8 @@ export function PlayerBar() {
|
|||||||
queueOpen && !isMobile && "right-72"
|
queueOpen && !isMobile && "right-72"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="pointer-events-auto flex w-full max-w-6xl items-center gap-2 rounded-full border border-foreground/20 bg-(--player-background) px-3 py-2 text-card-foreground shadow-lg [--player-background:var(--card)] @min-[640px]:gap-5 @min-[640px]:px-5 @min-[640px]:py-3 dark:border-white/20 dark:text-white dark:[--player-background:#303033]">
|
<div className="pointer-events-auto flex w-full max-w-[40rem] items-center gap-2 rounded-full border border-foreground/20 bg-(--player-background) px-3 py-2 text-card-foreground shadow-lg [--player-background:var(--card)] md:gap-3 md:py-1.5 dark:border-white/20 dark:text-white dark:[--player-background:#303033]">
|
||||||
<div className="flex shrink-0 items-center gap-0 @min-[640px]:gap-1 [&_button]:size-7 @min-[640px]:[&_button]:size-10 [&_svg]:size-4 @min-[640px]:[&_svg]:size-6">
|
<div className="flex shrink-0 items-center gap-0 md:gap-0.5 [&_button]:size-7 [&_svg]:size-4">
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="icon"
|
size="icon"
|
||||||
@@ -91,7 +91,7 @@ export function PlayerBar() {
|
|||||||
)}
|
)}
|
||||||
onClick={() => void toggleShuffle()}
|
onClick={() => void toggleShuffle()}
|
||||||
>
|
>
|
||||||
<Shuffle className="size-4 @min-[640px]:size-6" />
|
<Shuffle className="size-4" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
@@ -100,7 +100,7 @@ export function PlayerBar() {
|
|||||||
disabled={!hasQueue}
|
disabled={!hasQueue}
|
||||||
onClick={() => void skipPrevious()}
|
onClick={() => void skipPrevious()}
|
||||||
>
|
>
|
||||||
<SkipBack className="size-4 fill-current @min-[640px]:size-6" />
|
<SkipBack className="size-4 fill-current" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
@@ -110,9 +110,9 @@ export function PlayerBar() {
|
|||||||
onClick={() => setIsPlaying(!isPlaying)}
|
onClick={() => setIsPlaying(!isPlaying)}
|
||||||
>
|
>
|
||||||
{isPlaying ? (
|
{isPlaying ? (
|
||||||
<Pause className="size-5! fill-current @min-[640px]:size-8!" />
|
<Pause className="size-5! fill-current" />
|
||||||
) : (
|
) : (
|
||||||
<Play className="size-5! fill-current @min-[640px]:size-8!" />
|
<Play className="size-5! fill-current" />
|
||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
@@ -122,7 +122,7 @@ export function PlayerBar() {
|
|||||||
disabled={!hasQueue}
|
disabled={!hasQueue}
|
||||||
onClick={() => void skipNext()}
|
onClick={() => void skipNext()}
|
||||||
>
|
>
|
||||||
<SkipForward className="size-4 fill-current @min-[640px]:size-6" />
|
<SkipForward className="size-4 fill-current" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
@@ -138,33 +138,33 @@ export function PlayerBar() {
|
|||||||
onClick={() => void cycleRepeat()}
|
onClick={() => void cycleRepeat()}
|
||||||
>
|
>
|
||||||
{repeatEnabled === "once" ? (
|
{repeatEnabled === "once" ? (
|
||||||
<Repeat1 className="size-4 @min-[640px]:size-6" />
|
<Repeat1 className="size-4" />
|
||||||
) : (
|
) : (
|
||||||
<Repeat className="size-4 @min-[640px]:size-6" />
|
<Repeat className="size-4" />
|
||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="relative flex h-11 min-w-0 flex-1 items-center gap-2 pb-2 @min-[640px]:h-16 @min-[640px]:gap-3">
|
<div className="relative flex h-11 min-w-0 flex-1 items-center gap-2 pb-2 md:h-9 md:pb-1">
|
||||||
{currentSong ? (
|
{currentSong ? (
|
||||||
<>
|
<>
|
||||||
<div className="relative size-9 shrink-0 overflow-hidden rounded @min-[640px]:size-14">
|
<div className="relative size-9 shrink-0 overflow-hidden rounded md:size-8">
|
||||||
<Image
|
<Image
|
||||||
src={albumCoverUrl(currentSong.album.id)}
|
src={albumCoverUrl(currentSong.album.id)}
|
||||||
alt={currentSong.album.title}
|
alt={currentSong.album.title}
|
||||||
fill
|
fill
|
||||||
sizes="56px"
|
sizes="36px"
|
||||||
className="object-cover"
|
className="object-cover"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
<Link
|
<Link
|
||||||
href={`/album/${currentSong.album.id}`}
|
href={`/album/${currentSong.album.id}`}
|
||||||
className="block truncate text-sm font-semibold hover:underline @min-[640px]:text-xl"
|
className="block truncate text-sm font-semibold hover:underline md:text-[13px] md:leading-4"
|
||||||
>
|
>
|
||||||
{currentSong.title}
|
{currentSong.title}
|
||||||
</Link>
|
</Link>
|
||||||
<p className="truncate text-xs @min-[640px]:text-lg">
|
<p className="truncate text-xs">
|
||||||
<Link
|
<Link
|
||||||
href={`/artist/${currentSong.artist.id}`}
|
href={`/artist/${currentSong.artist.id}`}
|
||||||
className="hover:underline"
|
className="hover:underline"
|
||||||
@@ -200,7 +200,7 @@ export function PlayerBar() {
|
|||||||
<div className="absolute inset-x-0 -bottom-1">
|
<div className="absolute inset-x-0 -bottom-1">
|
||||||
<Slider
|
<Slider
|
||||||
className={cn(
|
className={cn(
|
||||||
"h-3 flex-1 [&_[data-slot=slider-range]]:bg-current/80 [&_[data-slot=slider-thumb]]:size-2 [&_[data-slot=slider-thumb]]:border-current [&_[data-slot=slider-thumb]]:bg-current [&_[data-slot=slider-thumb]]:opacity-0 focus-within:[&_[data-slot=slider-thumb]]:opacity-100 hover:[&_[data-slot=slider-thumb]]:opacity-100 [&_[data-slot=slider-track]]:h-[3px] [&_[data-slot=slider-track]]:bg-current/30",
|
"h-3 flex-1 [&_[data-slot=slider-range]]:bg-current/80 [&_[data-slot=slider-thumb]]:size-2 [&_[data-slot=slider-thumb]]:border-current [&_[data-slot=slider-thumb]]:bg-current [&_[data-slot=slider-thumb]]:opacity-0 focus-within:[&_[data-slot=slider-thumb]]:opacity-100 hover:[&_[data-slot=slider-thumb]]:opacity-100 [&_[data-slot=slider-track]]:h-[3px] [&_[data-slot=slider-track]]:bg-current/30 md:[&_[data-slot=slider-track]]:h-0.5",
|
||||||
!hasActiveSong && "[&_[data-slot=slider-thumb]]:hidden"
|
!hasActiveSong && "[&_[data-slot=slider-thumb]]:hidden"
|
||||||
)}
|
)}
|
||||||
min={0}
|
min={0}
|
||||||
@@ -222,7 +222,7 @@ export function PlayerBar() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex shrink-0 items-center gap-0 @min-[640px]:gap-2 [&_button]:size-7 @min-[640px]:[&_button]:size-10 [&_svg]:size-4 @min-[640px]:[&_svg]:size-6">
|
<div className="flex shrink-0 items-center gap-0 md:gap-1 [&_button]:size-7 [&_svg]:size-4">
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="icon"
|
size="icon"
|
||||||
@@ -230,7 +230,7 @@ export function PlayerBar() {
|
|||||||
aria-label="Lyrics"
|
aria-label="Lyrics"
|
||||||
disabled
|
disabled
|
||||||
>
|
>
|
||||||
<MessageSquareQuote className="size-4 @min-[640px]:size-6" />
|
<MessageSquareQuote className="size-4" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
@@ -240,12 +240,12 @@ export function PlayerBar() {
|
|||||||
className={cn(queueOpen && "text-primary")}
|
className={cn(queueOpen && "text-primary")}
|
||||||
onClick={toggleQueueOpen}
|
onClick={toggleQueueOpen}
|
||||||
>
|
>
|
||||||
<ListMusic className="size-4 @min-[640px]:size-6" />
|
<ListMusic className="size-4" />
|
||||||
</Button>
|
</Button>
|
||||||
<Popover>
|
<Popover>
|
||||||
<PopoverTrigger asChild>
|
<PopoverTrigger asChild>
|
||||||
<Button variant="ghost" size="icon" aria-label="Volume">
|
<Button variant="ghost" size="icon" aria-label="Volume">
|
||||||
<Volume2 className="size-4 @min-[640px]:size-6" />
|
<Volume2 className="size-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
<PopoverContent side="top" align="end" className="w-40">
|
<PopoverContent side="top" align="end" className="w-40">
|
||||||
|
|||||||
Reference in new issue
Block a user