Adjust AudioTitle in Player
- Show info on 2 lines - Show album
This commit is contained in:
committed by
Deluan Quintão
parent
63171368ed
commit
bc72f41180
@@ -24,6 +24,15 @@ const useStyle = makeStyles((theme) => ({
|
|||||||
audioTitle: {
|
audioTitle: {
|
||||||
textDecoration: 'none',
|
textDecoration: 'none',
|
||||||
color: theme.palette.primary.light,
|
color: theme.palette.primary.light,
|
||||||
|
'&.songTitle': {
|
||||||
|
fontWeight: 'bold',
|
||||||
|
},
|
||||||
|
'&.songInfo': {
|
||||||
|
// 768 is where the player swaps views
|
||||||
|
[theme.breakpoints.down(769)]: {
|
||||||
|
display: 'none',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
player: {
|
player: {
|
||||||
display: (props) => (props.visible ? 'block' : 'none'),
|
display: (props) => (props.visible ? 'block' : 'none'),
|
||||||
@@ -37,10 +46,17 @@ const audioTitle = (audioInfo) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const AudioTitle = ({ audioInfo, className }) => {
|
const AudioTitle = ({ audioInfo, className }) => {
|
||||||
const title = audioTitle(audioInfo)
|
if (!audioInfo.name) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link to={`/album/${audioInfo.albumId}/show`} className={className}>
|
<Link to={`/album/${audioInfo.albumId}/show`} className={className}>
|
||||||
{title}
|
<span className={`${className} songTitle`}>{audioInfo.name}</span>
|
||||||
|
<br />
|
||||||
|
<span className={`${className} songInfo`}>
|
||||||
|
{`${audioInfo.singer} - ${audioInfo.album}`}
|
||||||
|
</span>
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user