Fixed Twitch Live notis
This commit is contained in:
@@ -1151,30 +1151,32 @@ const ServerSettings = () => {
|
||||
{adminLogs.length === 0 ? (
|
||||
<Typography>No logs available.</Typography>
|
||||
) : (
|
||||
adminLogs.map(log => (
|
||||
<Box key={log.id} sx={{ p: 1, border: '1px solid #eee', mb: 1, borderRadius: 1, bgcolor: 'background.paper' }}>
|
||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start' }}>
|
||||
<Box sx={{ flex: 1 }}>
|
||||
<Typography variant="body2" sx={{ fontWeight: 'bold' }}>
|
||||
{log.action.toUpperCase()} - {log.targetUsername || 'Unknown User'} by {log.moderatorUsername || 'Unknown User'}
|
||||
</Typography>
|
||||
<Typography variant="body2">Reason: {log.reason}</Typography>
|
||||
{log.duration && <Typography variant="body2">Duration: {log.duration}</Typography>}
|
||||
<Typography variant="caption" color="text.secondary">
|
||||
{new Date(log.timestamp).toLocaleString()}
|
||||
</Typography>
|
||||
<React.Fragment>
|
||||
{adminLogs.map((log) => (
|
||||
<Box key={log.id} sx={{ p: 1, border: '1px solid #eee', mb: 1, borderRadius: 1, bgcolor: 'background.paper' }}>
|
||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start' }}>
|
||||
<Box sx={{ flex: 1 }}>
|
||||
<Typography variant="body2" sx={{ fontWeight: 'bold' }}>
|
||||
{log.action.toUpperCase()} - {log.targetUsername || 'Unknown User'} by {log.moderatorUsername || 'Unknown User'}
|
||||
</Typography>
|
||||
<Typography variant="body2">Reason: {log.reason}</Typography>
|
||||
{log.duration && <Typography variant="body2">Duration: {log.duration}</Typography>}
|
||||
<Typography variant="caption" color="text.secondary">
|
||||
{new Date(log.timestamp).toLocaleString()}
|
||||
</Typography>
|
||||
</Box>
|
||||
<IconButton
|
||||
size="small"
|
||||
color="error"
|
||||
onClick={() => setDeleteLogDialog({ open: true, logId: log.id, logAction: log.action })}
|
||||
sx={{ ml: 1 }}
|
||||
>
|
||||
<DeleteIcon fontSize="small" />
|
||||
</IconButton>
|
||||
</Box>
|
||||
<IconButton
|
||||
size="small"
|
||||
color="error"
|
||||
onClick={() => setDeleteLogDialog({ open: true, logId: log.id, logAction: log.action })}
|
||||
sx={{ ml: 1 }}
|
||||
>
|
||||
<DeleteIcon fontSize="small" />
|
||||
</IconButton>
|
||||
</Box>
|
||||
</Box>
|
||||
))
|
||||
))}
|
||||
</React.Fragment>
|
||||
)}
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user