fix(web): keep player colors and dimensions consistent (#65)
This commit was merged in pull request #65.
This commit is contained in:
1 parent
b7403356d6
commit
54c7dda06f
1 file changed
+13
-9
@@ -76,7 +76,7 @@ export function PlayerBar() {
|
||||
queueOpen && !isMobile && "right-72"
|
||||
)}
|
||||
>
|
||||
<div className="pointer-events-auto flex w-full max-w-6xl items-center gap-2 rounded-full border border-white/20 bg-[#303033] px-3 py-2 text-white shadow-lg @min-[640px]:gap-5 @min-[640px]:px-5 @min-[640px]:py-3">
|
||||
<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="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">
|
||||
<Button
|
||||
variant="ghost"
|
||||
@@ -85,7 +85,9 @@ export function PlayerBar() {
|
||||
aria-pressed={shuffleEnabled}
|
||||
className={cn(
|
||||
"hidden @min-[640px]:inline-flex",
|
||||
shuffleEnabled ? "text-white" : "text-white/40"
|
||||
shuffleEnabled
|
||||
? "text-card-foreground dark:text-white"
|
||||
: "text-muted-foreground dark:text-white/40"
|
||||
)}
|
||||
onClick={() => void toggleShuffle()}
|
||||
>
|
||||
@@ -129,7 +131,9 @@ export function PlayerBar() {
|
||||
aria-pressed={repeatEnabled !== "none"}
|
||||
className={cn(
|
||||
"hidden @min-[640px]:inline-flex",
|
||||
repeatEnabled !== "none" ? "text-white" : "text-white/40"
|
||||
repeatEnabled !== "none"
|
||||
? "text-card-foreground dark:text-white"
|
||||
: "text-muted-foreground dark:text-white/40"
|
||||
)}
|
||||
onClick={() => void cycleRepeat()}
|
||||
>
|
||||
@@ -141,7 +145,7 @@ export function PlayerBar() {
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div className="relative flex min-w-0 flex-1 items-center gap-2 pb-2 @min-[640px]:gap-3">
|
||||
<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">
|
||||
{currentSong ? (
|
||||
<>
|
||||
<div className="relative size-9 shrink-0 overflow-hidden rounded @min-[640px]:size-14">
|
||||
@@ -180,23 +184,23 @@ export function PlayerBar() {
|
||||
<AudioFormatBadge
|
||||
format={currentFormat}
|
||||
iconOnly
|
||||
backgroundColor="#303033"
|
||||
backgroundColor="var(--player-background)"
|
||||
/>
|
||||
) : null}
|
||||
</>
|
||||
) : (
|
||||
<Image
|
||||
src="/logo-monochrome.svg"
|
||||
src="/logo.png"
|
||||
alt="oTunes"
|
||||
width={14}
|
||||
width={24}
|
||||
height={24}
|
||||
className="mx-auto my-2 h-6 w-auto opacity-85"
|
||||
className="mx-auto size-6 opacity-85"
|
||||
/>
|
||||
)}
|
||||
<div className="absolute inset-x-0 -bottom-1">
|
||||
<Slider
|
||||
className={cn(
|
||||
"h-3 flex-1 [&_[data-slot=slider-range]]:bg-white/80 [&_[data-slot=slider-thumb]]:size-2 [&_[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-white/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",
|
||||
!hasActiveSong && "[&_[data-slot=slider-thumb]]:hidden"
|
||||
)}
|
||||
min={0}
|
||||
|
||||
Reference in new issue
Block a user