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