mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-09 06:33:03 -04:00
SpotifyControls: export album cover as CSS variable for themes (#2197)
--vc-spotify-track-image
This commit is contained in:
parent
9958f5a2ea
commit
5e7b4e9c92
3 changed files with 10 additions and 2 deletions
|
@ -371,6 +371,10 @@ export function Player() {
|
|||
if (!track || !device?.is_active || shouldHide)
|
||||
return null;
|
||||
|
||||
const exportTrackImageStyle = {
|
||||
"--vc-spotify-track-image": `url(${track?.album?.image?.url || ""})`,
|
||||
} as React.CSSProperties;
|
||||
|
||||
return (
|
||||
<ErrorBoundary fallback={() => (
|
||||
<div className="vc-spotify-fallback">
|
||||
|
@ -378,7 +382,7 @@ export function Player() {
|
|||
<p >Check the console for errors</p>
|
||||
</div>
|
||||
)}>
|
||||
<div id={cl("player")}>
|
||||
<div id={cl("player")} style={exportTrackImageStyle}>
|
||||
<Info track={track} />
|
||||
<SeekBar />
|
||||
<Controls />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue