feat: 按时间戳升序排序历史记录组内的日志。
This commit is contained in:
parent
03c1b6a487
commit
3aa4a9a912
@ -75,6 +75,11 @@ export function HistoryView() {
|
||||
groups[sid].logs.push(log)
|
||||
})
|
||||
|
||||
// Sort logs within each group by timestamp (ascending) for display
|
||||
Object.values(groups).forEach(group => {
|
||||
group.logs.sort((a, b) => new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime())
|
||||
})
|
||||
|
||||
// Convert to array and sort by timestamp
|
||||
const sortedGroups = Object.values(groups).sort((a, b) =>
|
||||
new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user