New api and zone management; highligh occlusion and highlighAll functionality; improved search in reports and alerts history + autofill; refactored alert panel
This commit is contained in:
@@ -66,6 +66,15 @@ const NotificationDetectorInfo: React.FC<NotificationDetectorInfoProps> = ({ det
|
||||
default: return 'text-gray-400'
|
||||
}
|
||||
}
|
||||
|
||||
const getPriorityText = (priority: string) => {
|
||||
switch (priority.toLowerCase()) {
|
||||
case 'high': return 'высокий'
|
||||
case 'medium': return 'средний'
|
||||
case 'low': return 'низкий'
|
||||
default: return priority
|
||||
}
|
||||
}
|
||||
|
||||
const latestNotification = detectorInfo.notifications && detectorInfo.notifications.length > 0
|
||||
? detectorInfo.notifications.sort((a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime())[0]
|
||||
@@ -87,7 +96,7 @@ const NotificationDetectorInfo: React.FC<NotificationDetectorInfoProps> = ({ det
|
||||
<div className="h-full overflow-auto">
|
||||
<div className="flex items-center justify-between mb-4">
|
||||
<h3 className="text-white text-lg font-medium">
|
||||
Датч.{detectorInfo.name}
|
||||
{detectorInfo.name}
|
||||
</h3>
|
||||
<div className="flex items-center gap-2">
|
||||
<button className="bg-[rgb(27,29,41)] hover:bg-[rgb(37,39,51)] text-white px-3 py-2 rounded-[10px] text-sm font-medium transition-colors flex items-center gap-2">
|
||||
@@ -102,10 +111,18 @@ const NotificationDetectorInfo: React.FC<NotificationDetectorInfoProps> = ({ det
|
||||
</svg>
|
||||
История
|
||||
</button>
|
||||
<button
|
||||
onClick={onClose}
|
||||
className="text-gray-400 hover:text-white transition-colors"
|
||||
>
|
||||
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Табличка с детекторами */}
|
||||
{/* Табличка */}
|
||||
<div className="space-y-0 border border-[rgb(30,31,36)] rounded-lg overflow-hidden">
|
||||
<div className="flex">
|
||||
<div className="flex-1 p-4 border-r border-[rgb(30,31,36)]">
|
||||
@@ -146,7 +163,7 @@ const NotificationDetectorInfo: React.FC<NotificationDetectorInfoProps> = ({ det
|
||||
<div className="flex-1 p-4">
|
||||
<div className="text-[rgb(113,113,122)] text-sm font-medium mb-1">Приоритет</div>
|
||||
<div className={`text-sm font-medium ${getPriorityColor(latestNotification.priority)}`}>
|
||||
{latestNotification.priority}
|
||||
{getPriorityText(latestNotification.priority)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -159,14 +176,6 @@ const NotificationDetectorInfo: React.FC<NotificationDetectorInfoProps> = ({ det
|
||||
)}
|
||||
</div>
|
||||
|
||||
<button
|
||||
onClick={onClose}
|
||||
className="absolute top-4 right-4 text-gray-400 hover:text-white transition-colors"
|
||||
>
|
||||
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user