feat: ajoute affichage auteur pour toutes les versions
This commit is contained in:
@@ -96,6 +96,11 @@ export default function VersionComparison({versionData, versionCompare}) {
|
||||
)}
|
||||
/>
|
||||
</Box>
|
||||
<Box sx={{mt: 1}}>
|
||||
<Typography sx={{textDecoration: 'underline'}} variant='caption' color='success'>
|
||||
@{main.user_created?.split('-')[0] || 'Système'}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Paper>
|
||||
</Grid>
|
||||
<Grid xs={6} sx={{width: '100%'}}>
|
||||
@@ -121,42 +126,42 @@ export default function VersionComparison({versionData, versionCompare}) {
|
||||
)}
|
||||
/>
|
||||
</Box>
|
||||
<Box sx={{mt: 1}}>
|
||||
<Typography sx={{textDecoration: 'underline'}} variant='caption' color='primary'>
|
||||
@{versionData.user_created?.split('-')[0] || 'Système'}
|
||||
</Typography>
|
||||
</Box>
|
||||
{!outdated && session?.user && (
|
||||
<>
|
||||
<Box sx={{
|
||||
display: 'flex', alignItems: 'center', justifyContent: 'space-between', mt: 1
|
||||
}}
|
||||
>
|
||||
<Box>
|
||||
<Typography sx={{textDecoration: 'underline'}} variant='caption' color='primary'>@{versionData.user_created.split('-')[0]}</Typography>
|
||||
{versionData && (
|
||||
<Typography sx={{fontWeight: 'bold'}} color={isVoteDisabled ? 'error' : 'primary'}>
|
||||
{formatDate(versionData.date_created)}
|
||||
</Typography>
|
||||
)}
|
||||
</Box>
|
||||
<Box sx={{
|
||||
display: 'flex', alignItems: 'center', justifyContent: 'space-between', mt: 1
|
||||
}}
|
||||
>
|
||||
<Box>
|
||||
{versionData && (
|
||||
<Typography sx={{fontWeight: 'bold'}} color={isVoteDisabled ? 'error' : 'primary'}>
|
||||
{formatDate(versionData.date_created)}
|
||||
</Typography>
|
||||
)}
|
||||
</Box>
|
||||
<Box sx={{display: 'flex', justifyContent: 'flex-end'}}>
|
||||
<IconButton
|
||||
size='small'
|
||||
color={currentVote === 1 ? 'success' : 'primary'}
|
||||
aria-label='vote positif'
|
||||
onClick={() => handleVoteClick(1)}
|
||||
>
|
||||
<ThumbUpIcon />
|
||||
</IconButton>
|
||||
<IconButton
|
||||
size='small'
|
||||
color={currentVote === -1 ? 'error' : 'primary'}
|
||||
aria-label='vote négatif'
|
||||
onClick={() => handleVoteClick(-1)}
|
||||
>
|
||||
<ThumbDownIcon />
|
||||
</IconButton>
|
||||
</Box>
|
||||
<Box sx={{display: 'flex', justifyContent: 'flex-end'}}>
|
||||
<IconButton
|
||||
size='small'
|
||||
color={currentVote === 1 ? 'success' : 'primary'}
|
||||
aria-label='vote positif'
|
||||
onClick={() => handleVoteClick(1)}
|
||||
>
|
||||
<ThumbUpIcon />
|
||||
</IconButton>
|
||||
<IconButton
|
||||
size='small'
|
||||
color={currentVote === -1 ? 'error' : 'primary'}
|
||||
aria-label='vote négatif'
|
||||
onClick={() => handleVoteClick(-1)}
|
||||
>
|
||||
<ThumbDownIcon />
|
||||
</IconButton>
|
||||
</Box>
|
||||
</>
|
||||
</Box>
|
||||
)}
|
||||
</Paper>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user