mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-07 06:27:36 +03:00
Fade in QualityInfo while hovering on Song title (#1041)
* feat(Player/QualityInfo) : Animate Quality Info + Increased audio player dimensions Signed-off-by: Shishir <shishir.srik@gmail.com> * fix(Player.js) : Converted JS hover functionality to pure CSS Signed-off-by: Shishir <shishir.srik@gmail.com> * Removed unused useState * fix(Player) : Reverted player height adjustment Signed-off-by: Shishir <shishir.srik@gmail.com>
This commit is contained in:
parent
467eb345ad
commit
6da9dee7d3
2 changed files with 17 additions and 6 deletions
|
@ -37,10 +37,20 @@ const useStyle = makeStyles(
|
|||
},
|
||||
},
|
||||
qualityInfo: {
|
||||
marginTop: '-2px',
|
||||
marginTop: '-4px',
|
||||
opacity: 0,
|
||||
transition: 'all 500ms ease-out',
|
||||
},
|
||||
audioName: {
|
||||
'&:hover + $qualityInfo': {
|
||||
opacity: 1,
|
||||
},
|
||||
},
|
||||
player: {
|
||||
display: (props) => (props.visible ? 'block' : 'none'),
|
||||
},
|
||||
artistAlbum: {
|
||||
marginTop: '2px',
|
||||
'& .play-mode-title': {
|
||||
'pointer-events': 'none',
|
||||
},
|
||||
|
@ -65,7 +75,7 @@ const AudioTitle = React.memo(({ audioInfo, isMobile }) => {
|
|||
return (
|
||||
<Link to={`/album/${audioInfo.albumId}/show`} className={className}>
|
||||
<span className={`${className} songTitle`}>
|
||||
{audioInfo.name}
|
||||
<span className={classes.audioName}>{audioInfo.name}</span>
|
||||
{isDesktop && (
|
||||
<QualityInfo record={qi} className={classes.qualityInfo} />
|
||||
)}
|
||||
|
@ -73,9 +83,11 @@ const AudioTitle = React.memo(({ audioInfo, isMobile }) => {
|
|||
{!isMobile && (
|
||||
<>
|
||||
<br />
|
||||
<span className={`${className} songInfo`}>
|
||||
{`${audioInfo.singer} - ${audioInfo.album}`}
|
||||
</span>
|
||||
<div className={classes.artistAlbum}>
|
||||
<span className={`${className} songInfo`}>
|
||||
{`${audioInfo.singer} - ${audioInfo.album}`}
|
||||
</span>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</Link>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue