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
|
const roleToTag = (r: string) => <Tooltip
|
||||||
title={r in rdapRoleDetailTranslated ? rdapRoleDetailTranslated[r as keyof typeof rdapRoleDetailTranslated] : undefined}>
|
title={r in rdapRoleDetailTranslated ? rdapRoleDetailTranslated[r as keyof typeof rdapRoleDetailTranslated] : undefined}>
|
||||||
<Tag
|
<Tag color={rolesToColor([r])}>{
|
||||||
color={rolesToColor([r])}>{rdapRoleTranslated[r as keyof typeof rdapRoleTranslated]}</Tag>
|
r in rdapRoleTranslated ? rdapRoleTranslated[r as keyof typeof rdapRoleTranslated] : r
|
||||||
|
}</Tag>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
return <List
|
return <List
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ export function EventTimeline({events}: { events: Event[] }) {
|
|||||||
<Timeline
|
<Timeline
|
||||||
mode={sm ? "left" : "right"}
|
mode={sm ? "left" : "right"}
|
||||||
items={events.map(e => {
|
items={events.map(e => {
|
||||||
const sameEvents = events.filter(se => se.action === e.action)
|
|
||||||
|
|
||||||
const eventName = <Typography.Text style={{color: e.deleted ? 'grey' : 'default'}}>
|
const eventName = <Typography.Text style={{color: e.deleted ? 'grey' : 'default'}}>
|
||||||
{e.action in rdapEventNameTranslated ? rdapEventNameTranslated[e.action as keyof typeof rdapEventNameTranslated] : e.action}
|
{e.action in rdapEventNameTranslated ? rdapEventNameTranslated[e.action as keyof typeof rdapEventNameTranslated] : e.action}
|
||||||
</Typography.Text>
|
</Typography.Text>
|
||||||
|
|||||||
@@ -80,12 +80,12 @@ export function WatchlistCard({watchlist, onUpdateWatchlist, connectors, onDelet
|
|||||||
dataSource={[{
|
dataSource={[{
|
||||||
domains: watchlist.domains.map(d => <Tag
|
domains: watchlist.domains.map(d => <Tag
|
||||||
color={
|
color={
|
||||||
d.deleted ? 'magenta' : // If the domain is deleted
|
d.deleted ? 'magenta' :
|
||||||
d.status.includes('redemption period') ? 'yellow' :
|
d.status.includes('redemption period') ? 'yellow' :
|
||||||
d.status.includes('pending delete') ? 'volcano' : 'default'
|
d.status.includes('pending delete') ? 'volcano' : 'default'
|
||||||
}
|
}
|
||||||
icon={
|
icon={
|
||||||
d.deleted ? <DeleteOutlined/> : // If the domain is deleted
|
d.deleted ? <DeleteOutlined/> :
|
||||||
d.status.includes('redemption period') ? <ExclamationCircleOutlined/> :
|
d.status.includes('redemption period') ? <ExclamationCircleOutlined/> :
|
||||||
d.status.includes('pending delete') ? <DeleteOutlined/> : null
|
d.status.includes('pending delete') ? <DeleteOutlined/> : null
|
||||||
}>{punycode.toUnicode(d.ldhName)}</Tag>),
|
}>{punycode.toUnicode(d.ldhName)}</Tag>),
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import {
|
|||||||
ClockCircleOutlined,
|
ClockCircleOutlined,
|
||||||
DeleteOutlined,
|
DeleteOutlined,
|
||||||
LockOutlined,
|
LockOutlined,
|
||||||
|
PushpinOutlined,
|
||||||
ReloadOutlined,
|
ReloadOutlined,
|
||||||
ShareAltOutlined,
|
ShareAltOutlined,
|
||||||
SignatureOutlined,
|
SignatureOutlined,
|
||||||
@@ -23,4 +24,5 @@ export const actionToIcon = (a: EventAction) => a === 'registration' ?
|
|||||||
<ClockCircleOutlined
|
<ClockCircleOutlined
|
||||||
style={{fontSize: '16px'}}/> : a === 'enum validation expiration' ?
|
style={{fontSize: '16px'}}/> : a === 'enum validation expiration' ?
|
||||||
<ClockCircleOutlined style={{fontSize: '16px'}}/> : a === 'reinstantiation' ?
|
<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