Update system-logs.tsx

This commit is contained in:
MacRimi
2025-10-12 20:12:55 +02:00
parent 81feccf0d2
commit c7e3305a76

View File

@@ -993,32 +993,41 @@ export function SystemLogs() {
{/* Notifications Tab */} {/* Notifications Tab */}
<TabsContent value="notifications" className="space-y-4"> <TabsContent value="notifications" className="space-y-4">
<ScrollArea className="h-[600px] w-full rounded-md border border-border"> <ScrollArea className="h-[600px] w-full rounded-md border border-border">
<div className="space-y-3 p-3 sm:p-4"> <div className="space-y-2 sm:space-y-3 p-2 sm:p-4">
{notifications.map((notification, index) => ( {notifications.map((notification, index) => (
<div <div
key={index} key={index}
className="flex flex-col space-y-2 p-3 sm:p-4 rounded-lg bg-card/50 border border-border/50 hover:bg-card/80 transition-colors cursor-pointer" className="flex flex-col space-y-2 p-2.5 sm:p-4 rounded-lg bg-card/50 border border-border/50 hover:bg-card/80 transition-colors cursor-pointer"
onClick={() => { onClick={() => {
setSelectedNotification(notification) setSelectedNotification(notification)
setIsNotificationModalOpen(true) setIsNotificationModalOpen(true)
}} }}
> >
<div className="flex items-start sm:items-center gap-2 flex-wrap"> {/* Header with icon, badge, and timestamp */}
<div className="flex items-center gap-2"> <div className="flex items-start justify-between gap-2">
{getNotificationIcon(notification.type)} <div className="flex items-center gap-2 min-w-0 flex-1">
<Badge variant="outline" className={`${getNotificationTypeColor(notification.type)} text-xs`}> <div className="flex-shrink-0">{getNotificationIcon(notification.type)}</div>
<Badge
variant="outline"
className={`${getNotificationTypeColor(notification.type)} text-[10px] sm:text-xs px-1.5 sm:px-2 py-0.5 flex-shrink-0`}
>
{notification.type.toUpperCase()} {notification.type.toUpperCase()}
</Badge> </Badge>
</div> </div>
<div className="text-xs text-muted-foreground font-mono ml-auto">{notification.timestamp}</div> <div className="text-[10px] sm:text-xs text-muted-foreground font-mono whitespace-nowrap flex-shrink-0">
{notification.timestamp}
</div>
</div> </div>
<div className="space-y-1.5"> {/* Message content */}
<div className="text-sm text-foreground break-words overflow-hidden"> <div className="space-y-1.5 min-w-0">
<div className="text-xs sm:text-sm text-foreground break-words overflow-hidden line-clamp-3">
{notification.message} {notification.message}
</div> </div>
<div className="text-xs text-muted-foreground break-words"> <div className="text-[10px] sm:text-xs text-muted-foreground break-words overflow-hidden">
Service: {notification.service} Source: {notification.source} <span className="inline-block">Service: {notification.service}</span>
<span className="mx-1"></span>
<span className="inline-block">Source: {notification.source}</span>
</div> </div>
</div> </div>
</div> </div>