mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: improve the display of entity handles
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import {List, Tag, Tooltip} from "antd";
|
import {List, Tag, Tooltip, Typography} from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {Domain} from "../../utils/api";
|
import {Domain} from "../../utils/api";
|
||||||
import {rdapRoleDetailTranslation, rdapRoleTranslation} from "../../utils/functions/rdapTranslation";
|
import {rdapRoleDetailTranslation, rdapRoleTranslation} from "../../utils/functions/rdapTranslation";
|
||||||
@@ -28,7 +28,7 @@ export function EntitiesList({domain}: { domain: Domain }) {
|
|||||||
return <List.Item>
|
return <List.Item>
|
||||||
<List.Item.Meta
|
<List.Item.Meta
|
||||||
avatar={roleToAvatar(e)}
|
avatar={roleToAvatar(e)}
|
||||||
title={e.entity.handle}
|
title={<Typography.Text code>{e.entity.handle}</Typography.Text>}
|
||||||
description={<>
|
description={<>
|
||||||
{details.fn && <div>👤 {details.fn}</div>}
|
{details.fn && <div>👤 {details.fn}</div>}
|
||||||
{details.organization && <div>🏢 {details.organization}</div>}
|
{details.organization && <div>🏢 {details.organization}</div>}
|
||||||
|
|||||||
@@ -13,12 +13,13 @@ import {rolesToColor} from "./rolesToColor";
|
|||||||
|
|
||||||
export const roleToAvatar = (e: { roles: string[] }) => <Avatar style={{backgroundColor: rolesToColor(e.roles)}}
|
export const roleToAvatar = (e: { roles: string[] }) => <Avatar style={{backgroundColor: rolesToColor(e.roles)}}
|
||||||
icon={e.roles.includes('registrant') ?
|
icon={e.roles.includes('registrant') ?
|
||||||
<SignatureOutlined/> : e.roles.includes('registrar') ?
|
<SignatureOutlined/> :
|
||||||
|
e.roles.includes('registrar') ?
|
||||||
<BankOutlined/> :
|
<BankOutlined/> :
|
||||||
e.roles.includes('technical') ?
|
e.roles.includes('administrative') ?
|
||||||
<ToolOutlined/> :
|
<IdcardOutlined/> :
|
||||||
e.roles.includes('administrative') ?
|
e.roles.includes('technical') ?
|
||||||
<IdcardOutlined/> :
|
<ToolOutlined/> :
|
||||||
e.roles.includes('billing') ?
|
e.roles.includes('billing') ?
|
||||||
<DollarOutlined/> :
|
<DollarOutlined/> :
|
||||||
<UserOutlined/>}/>
|
<UserOutlined/>}/>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
export const rolesToColor = (roles: string[]) => roles.includes('registrant') ? 'green' :
|
export const rolesToColor = (roles: string[]) => roles.includes('registrant') ? 'green' :
|
||||||
roles.includes('technical') ? 'orange' :
|
roles.includes('registrar') ? 'purple' :
|
||||||
roles.includes('administrative') ? 'blue' :
|
roles.includes('administrative') ? 'blue' :
|
||||||
roles.includes('registrar') ? 'purple' :
|
roles.includes('technical') ? 'orange' :
|
||||||
roles.includes('sponsor') ? 'magenta' :
|
roles.includes('sponsor') ? 'magenta' :
|
||||||
roles.includes('billing') ? 'cyan' : 'default'
|
roles.includes('billing') ? 'cyan' : 'default'
|
||||||
@@ -357,6 +357,9 @@ readonly class RDAPService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws \DateMalformedStringException
|
||||||
|
*/
|
||||||
private function updateDomainNameservers(Domain $domain, array $rdapData): void
|
private function updateDomainNameservers(Domain $domain, array $rdapData): void
|
||||||
{
|
{
|
||||||
if (array_key_exists('nameservers', $rdapData) && is_array($rdapData['nameservers'])) {
|
if (array_key_exists('nameservers', $rdapData) && is_array($rdapData['nameservers'])) {
|
||||||
|
|||||||
Reference in New Issue
Block a user