mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-17 17:55:42 +00:00
chore: simplify the Watchlist component
This commit is contained in:
parent
16e3d3b33a
commit
f86153049b
@ -1,4 +1,4 @@
|
||||
import {Card, Divider, Space, Table, Tag, Tooltip} from "antd";
|
||||
import {Card, Col, Divider, Row, Space, Tag, Tooltip} from "antd";
|
||||
import {DisconnectOutlined, LinkOutlined} from "@ant-design/icons";
|
||||
import {t} from "ttag";
|
||||
import {ViewDiagramWatchlistButton} from "./diagram/ViewDiagramWatchlistButton";
|
||||
@ -72,24 +72,21 @@ export function WatchlistCard({watchlist, onUpdateWatchlist, connectors, onDelet
|
||||
}
|
||||
>
|
||||
<Card.Meta description={watchlist.token} style={{marginBottom: '1em'}}/>
|
||||
<Table
|
||||
size='small'
|
||||
columns={columns}
|
||||
pagination={false}
|
||||
style={{width: '100%'}}
|
||||
dataSource={[{
|
||||
domains: watchlist.domains.map(d => <DomainToTag domain={d}/>),
|
||||
events: watchlist.triggers?.filter(t => t.action === 'email')
|
||||
<Row gutter={16}>
|
||||
<Col span={16}>
|
||||
{watchlist.domains.map(d => <DomainToTag domain={d}/>)}
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
{watchlist.triggers?.filter(t => t.action === 'email')
|
||||
.map(t => <Tooltip
|
||||
title={t.event in rdapEventDetailTranslated ? rdapEventDetailTranslated[t.event as keyof typeof rdapEventDetailTranslated] : undefined}>
|
||||
<Tag color={actionToColor(t.event)}>
|
||||
{rdapEventNameTranslated[t.event as keyof typeof rdapEventNameTranslated]}
|
||||
</Tag>
|
||||
</Tooltip>
|
||||
)
|
||||
}]}
|
||||
{...(sm ? {scroll: {y: 'max-content'}} : {scroll: {y: 240}})}
|
||||
/>
|
||||
)}
|
||||
</Col>
|
||||
</Row>
|
||||
</Card>
|
||||
<Divider/>
|
||||
</>
|
||||
|
||||
@ -177,7 +177,7 @@ readonly class RDAPService
|
||||
$tld = strtolower(idn_to_ascii(substr($domain, $lastDotPosition + 1)));
|
||||
$tldEntity = $this->tldRepository->findOneBy(['tld' => $tld]);
|
||||
if (null === $tldEntity) {
|
||||
throw new NotFoundHttpException("The requested TLD is not yet supported, please try again with another one");
|
||||
throw new NotFoundHttpException('The requested TLD is not yet supported, please try again with another one');
|
||||
}
|
||||
|
||||
return $tldEntity;
|
||||
|
||||
@ -43,7 +43,7 @@ msgstr ""
|
||||
#: assets/components/LoginForm.tsx:62
|
||||
#: assets/components/RegisterForm.tsx:41
|
||||
#: assets/components/RegisterForm.tsx:49
|
||||
#: assets/components/search/DomainSearchBar.tsx:20
|
||||
#: assets/components/search/DomainSearchBar.tsx:21
|
||||
#: assets/components/tracking/connector/ConnectorForm.tsx:43
|
||||
#: assets/components/tracking/connector/ConnectorForm.tsx:69
|
||||
#: assets/components/tracking/connector/ConnectorForm.tsx:77
|
||||
@ -109,7 +109,7 @@ msgstr ""
|
||||
msgid "Entities"
|
||||
msgstr ""
|
||||
|
||||
#: assets/components/search/DomainSearchBar.tsx:23
|
||||
#: assets/components/search/DomainSearchBar.tsx:24
|
||||
#: assets/components/tracking/watchlist/WatchlistForm.tsx:118
|
||||
msgid "This domain name does not appear to be valid"
|
||||
msgstr ""
|
||||
@ -514,11 +514,11 @@ msgstr ""
|
||||
msgid "Sorry, the page you visited does not exist."
|
||||
msgstr ""
|
||||
|
||||
#: assets/pages/search/DomainSearchPage.tsx:28
|
||||
#: assets/pages/search/DomainSearchPage.tsx:24
|
||||
msgid "Found !"
|
||||
msgstr ""
|
||||
|
||||
#: assets/pages/search/DomainSearchPage.tsx:44
|
||||
#: assets/pages/search/DomainSearchPage.tsx:46
|
||||
msgid ""
|
||||
"Although the domain exists in my database, it has been deleted from the "
|
||||
"WHOIS by its registrar."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user