Fix explicit lyrics display & move submit username

This commit is contained in:
Cédric FAMIBELLE-PRONZOLA
2022-10-27 19:36:52 +04:00
parent 1f322acc09
commit 01c13dac48
2 changed files with 22 additions and 19 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ export default function MizikLis({meteEsMobilOuve, niAwtis, paroles, slugTeksChw
onClick={() => handleClick(attributes.slug)} onClick={() => handleClick(attributes.slug)}
> >
<ListItemText primary={attributes.titre} secondary={niAwtis ? getAlias(attributes.artistes, attributes.prioriteArtistes) : null} /> <ListItemText primary={attributes.titre} secondary={niAwtis ? getAlias(attributes.artistes, attributes.prioriteArtistes) : null} />
{attributes.explicite && ( {attributes.explicitLyrics && (
<ExplicitIcon style={{marginRight: 5}} color='secondary' /> <ExplicitIcon style={{marginRight: 5}} color='secondary' />
)} )}
{attributes.okiMizikID && ( {attributes.okiMizikID && (
+17 -14
View File
@@ -8,7 +8,8 @@ import {
CardContent, CardContent,
CardMedia, CardMedia,
Typography, Typography,
Grid Grid,
Box
} from '@mui/material' } from '@mui/material'
import ExplicitIcon from '@mui/icons-material/Explicit' import ExplicitIcon from '@mui/icons-material/Explicit'
import {styled} from '@mui/material/styles' import {styled} from '@mui/material/styles'
@@ -59,30 +60,32 @@ export default function TeksKat({parole}) {
title={titre} title={titre}
/> />
<CardContent> <CardContent>
<Box sx={{display: 'flex', alignItems: 'center'}}>
<Typography display='inline' style={{marginRight: 5}} variant='h6' component='h2'> <Typography display='inline' style={{marginRight: 5}} variant='h6' component='h2'>
{titre} {titre}
</Typography> </Typography>
{parole.eksplisit && ( {attributes.explicitLyrics && (
<ExplicitIcon style={{marginRight: 5}} color='secondary' fontSize='small' /> <ExplicitIcon style={{marginRight: 5}} color='secondary' fontSize='small' />
)} )}
<Typography variant='caption'> </Box>
{parole.user && (
<>
(<i>parole soumise par {parole.user.username}</i>)
</>
)}
{parole.userAdmin && !parole.user && (
<>
(<i>parole soumise par {parole.userAdmin}</i>)
</>
)}
</Typography>
<Typography variant='body2' color='textSecondary' component='p'> <Typography variant='body2' color='textSecondary' component='p'>
{aliases} {aliases}
</Typography> </Typography>
<Typography variant='body2' color='textSecondary' component='p'> <Typography variant='body2' color='textSecondary' component='p'>
{annee} {annee}
</Typography> </Typography>
<Typography sx={{fontStyle: 'italic'}} variant='caption'>
{attributes.user && (
<>
(<i>parole soumise par {attributes.user.username}</i>)
</>
)}
{attributes.userAdmin && !attributes.user && (
<>
(<i>parole soumise par {attributes.userAdmin}</i>)
</>
)}
</Typography>
<Typography align='center' style={{marginTop: '0.5em'}} variant='body1' color='textSecondary' component='p'> <Typography align='center' style={{marginTop: '0.5em'}} variant='body1' color='textSecondary' component='p'>
Publiée le : {datPiblikasyon} Publiée le : {datPiblikasyon}
</Typography> </Typography>