lavoce #40

Merged
bragaz_rexita merged 3 commits from lavoce into main 2026-01-20 04:32:43 +00:00
Showing only changes of commit e8da716e8f - Show all commits

View File

@@ -36,7 +36,6 @@ import {
PlusOutlined, PlusOutlined,
ExclamationCircleOutlined, ExclamationCircleOutlined,
SearchOutlined, SearchOutlined,
MailFilled,
} from '@ant-design/icons'; } from '@ant-design/icons';
import { useNavigate, Link as RouterLink } from 'react-router-dom'; import { useNavigate, Link as RouterLink } from 'react-router-dom';
import { import {
@@ -49,7 +48,11 @@ import {
} from '../../../api/notification'; } from '../../../api/notification';
const { Text, Paragraph, Link: AntdLink } = Typography; const { Text, Paragraph, Link: AntdLink } = Typography;
const openMail = (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640">
<path d="M576 480C576 515.3 547.5 544 512.1 544L128 544C92.6 544 64 515.3 64 480L64 228C64.1 212.5 71.8 198 84.5 189.2L270 61.3C300.1 40.6 339.8 40.6 369.9 61.3L555.5 189.2C568.3 198 575.9 212.5 576 228L576 480zM128 496L512.1 496C520.9 496 528 488.9 528 480L528 288.3L373.2 405.7C341.8 429.6 298.3 429.6 266.8 405.7L112 288.3L112 480C112 488.9 119.2 496 128 496zM527.6 228.4L342.7 100.8C329 91.4 311 91.4 297.3 100.8L112.4 228.4L295.8 367.5C310.1 378.3 329.9 378.3 344.2 367.5L527.6 228.4z" />
</svg>
);
// Transform API response to component format // Transform API response to component format
const transformNotificationData = (apiData) => { const transformNotificationData = (apiData) => {
return apiData.map((item, index) => ({ return apiData.map((item, index) => ({
@@ -184,13 +187,13 @@ const ListNotification = memo(function ListNotification(props) {
const getIconAndColor = (type) => { const getIconAndColor = (type) => {
switch (type) { switch (type) {
case 'critical': case 'critical':
return { IconComponent: MailFilled, color: '#faad14', bgColor: '#fff1f0' }; return { IconComponent: MailOutlined, color: '#faad14', bgColor: '#fff1f0' };
case 'warning': case 'warning':
return { IconComponent: MailFilled, color: '#1890ff', bgColor: '#fffbe6' }; return { IconComponent: MailOutlined, color: '#1890ff', bgColor: '#fffbe6' };
case 'resolved': case 'resolved':
return { IconComponent: MailFilled, color: '#52c41a', bgColor: '#f6ffed' }; return { IconComponent: MailOutlined, color: '#52c41a', bgColor: '#f6ffed' };
default: default:
return { IconComponent: MailFilled, color: '#1890ff', bgColor: '#e6f7ff' }; return { IconComponent: MailOutlined, color: '#1890ff', bgColor: '#e6f7ff' };
} }
}; };
@@ -407,7 +410,11 @@ const ListNotification = memo(function ListNotification(props) {
flexShrink: 0, flexShrink: 0,
}} }}
> >
<IconComponent style={{ fontSize: '22px' }} /> {notification.type === 'resolved' ? (
openMail
) : (
<IconComponent style={{ fontSize: '22px' }} />
)}
</div> </div>
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<Row align="top"> <Row align="top">