mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: display an icon even if the event action is not standard
This commit is contained in:
@@ -14,8 +14,9 @@ export function EntitiesList({domain}: { domain: Domain }) {
|
||||
|
||||
const roleToTag = (r: string) => <Tooltip
|
||||
title={r in rdapRoleDetailTranslated ? rdapRoleDetailTranslated[r as keyof typeof rdapRoleDetailTranslated] : undefined}>
|
||||
<Tag
|
||||
color={rolesToColor([r])}>{rdapRoleTranslated[r as keyof typeof rdapRoleTranslated]}</Tag>
|
||||
<Tag color={rolesToColor([r])}>{
|
||||
r in rdapRoleTranslated ? rdapRoleTranslated[r as keyof typeof rdapRoleTranslated] : r
|
||||
}</Tag>
|
||||
</Tooltip>
|
||||
|
||||
return <List
|
||||
|
||||
@@ -17,8 +17,6 @@ export function EventTimeline({events}: { events: Event[] }) {
|
||||
<Timeline
|
||||
mode={sm ? "left" : "right"}
|
||||
items={events.map(e => {
|
||||
const sameEvents = events.filter(se => se.action === e.action)
|
||||
|
||||
const eventName = <Typography.Text style={{color: e.deleted ? 'grey' : 'default'}}>
|
||||
{e.action in rdapEventNameTranslated ? rdapEventNameTranslated[e.action as keyof typeof rdapEventNameTranslated] : e.action}
|
||||
</Typography.Text>
|
||||
|
||||
@@ -80,12 +80,12 @@ export function WatchlistCard({watchlist, onUpdateWatchlist, connectors, onDelet
|
||||
dataSource={[{
|
||||
domains: watchlist.domains.map(d => <Tag
|
||||
color={
|
||||
d.deleted ? 'magenta' : // If the domain is deleted
|
||||
d.deleted ? 'magenta' :
|
||||
d.status.includes('redemption period') ? 'yellow' :
|
||||
d.status.includes('pending delete') ? 'volcano' : 'default'
|
||||
}
|
||||
icon={
|
||||
d.deleted ? <DeleteOutlined/> : // If the domain is deleted
|
||||
d.deleted ? <DeleteOutlined/> :
|
||||
d.status.includes('redemption period') ? <ExclamationCircleOutlined/> :
|
||||
d.status.includes('pending delete') ? <DeleteOutlined/> : null
|
||||
}>{punycode.toUnicode(d.ldhName)}</Tag>),
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
ClockCircleOutlined,
|
||||
DeleteOutlined,
|
||||
LockOutlined,
|
||||
PushpinOutlined,
|
||||
ReloadOutlined,
|
||||
ShareAltOutlined,
|
||||
SignatureOutlined,
|
||||
@@ -23,4 +24,5 @@ export const actionToIcon = (a: EventAction) => a === 'registration' ?
|
||||
<ClockCircleOutlined
|
||||
style={{fontSize: '16px'}}/> : a === 'enum validation expiration' ?
|
||||
<ClockCircleOutlined style={{fontSize: '16px'}}/> : a === 'reinstantiation' ?
|
||||
<ReloadOutlined style={{fontSize: '16px'}}/> : undefined
|
||||
<ReloadOutlined style={{fontSize: '16px'}}/> :
|
||||
<PushpinOutlined style={{fontSize: '16px'}}/>
|
||||
Reference in New Issue
Block a user