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:
@@ -37,10 +37,20 @@ const useStyle = makeStyles(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
qualityInfo: {
|
qualityInfo: {
|
||||||
marginTop: '-2px',
|
marginTop: '-4px',
|
||||||
|
opacity: 0,
|
||||||
|
transition: 'all 500ms ease-out',
|
||||||
|
},
|
||||||
|
audioName: {
|
||||||
|
'&:hover + $qualityInfo': {
|
||||||
|
opacity: 1,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
player: {
|
player: {
|
||||||
display: (props) => (props.visible ? 'block' : 'none'),
|
display: (props) => (props.visible ? 'block' : 'none'),
|
||||||
|
},
|
||||||
|
artistAlbum: {
|
||||||
|
marginTop: '2px',
|
||||||
'& .play-mode-title': {
|
'& .play-mode-title': {
|
||||||
'pointer-events': 'none',
|
'pointer-events': 'none',
|
||||||
},
|
},
|
||||||
@@ -65,7 +75,7 @@ const AudioTitle = React.memo(({ audioInfo, isMobile }) => {
|
|||||||
return (
|
return (
|
||||||
<Link to={`/album/${audioInfo.albumId}/show`} className={className}>
|
<Link to={`/album/${audioInfo.albumId}/show`} className={className}>
|
||||||
<span className={`${className} songTitle`}>
|
<span className={`${className} songTitle`}>
|
||||||
{audioInfo.name}
|
<span className={classes.audioName}>{audioInfo.name}</span>
|
||||||
{isDesktop && (
|
{isDesktop && (
|
||||||
<QualityInfo record={qi} className={classes.qualityInfo} />
|
<QualityInfo record={qi} className={classes.qualityInfo} />
|
||||||
)}
|
)}
|
||||||
@@ -73,9 +83,11 @@ const AudioTitle = React.memo(({ audioInfo, isMobile }) => {
|
|||||||
{!isMobile && (
|
{!isMobile && (
|
||||||
<>
|
<>
|
||||||
<br />
|
<br />
|
||||||
<span className={`${className} songInfo`}>
|
<div className={classes.artistAlbum}>
|
||||||
{`${audioInfo.singer} - ${audioInfo.album}`}
|
<span className={`${className} songInfo`}>
|
||||||
</span>
|
{`${audioInfo.singer} - ${audioInfo.album}`}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ const PlaylistList = ({ permissions, ...props }) => (
|
|||||||
<Writable>
|
<Writable>
|
||||||
<EditButton />
|
<EditButton />
|
||||||
</Writable>
|
</Writable>
|
||||||
/>
|
|
||||||
</Datagrid>
|
</Datagrid>
|
||||||
</List>
|
</List>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user