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 {DisconnectOutlined, LinkOutlined} from "@ant-design/icons";
|
||||||
import {t} from "ttag";
|
import {t} from "ttag";
|
||||||
import {ViewDiagramWatchlistButton} from "./diagram/ViewDiagramWatchlistButton";
|
import {ViewDiagramWatchlistButton} from "./diagram/ViewDiagramWatchlistButton";
|
||||||
@ -72,24 +72,21 @@ export function WatchlistCard({watchlist, onUpdateWatchlist, connectors, onDelet
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Card.Meta description={watchlist.token} style={{marginBottom: '1em'}}/>
|
<Card.Meta description={watchlist.token} style={{marginBottom: '1em'}}/>
|
||||||
<Table
|
<Row gutter={16}>
|
||||||
size='small'
|
<Col span={16}>
|
||||||
columns={columns}
|
{watchlist.domains.map(d => <DomainToTag domain={d}/>)}
|
||||||
pagination={false}
|
</Col>
|
||||||
style={{width: '100%'}}
|
<Col span={8}>
|
||||||
dataSource={[{
|
{watchlist.triggers?.filter(t => t.action === 'email')
|
||||||
domains: watchlist.domains.map(d => <DomainToTag domain={d}/>),
|
|
||||||
events: watchlist.triggers?.filter(t => t.action === 'email')
|
|
||||||
.map(t => <Tooltip
|
.map(t => <Tooltip
|
||||||
title={t.event in rdapEventDetailTranslated ? rdapEventDetailTranslated[t.event as keyof typeof rdapEventDetailTranslated] : undefined}>
|
title={t.event in rdapEventDetailTranslated ? rdapEventDetailTranslated[t.event as keyof typeof rdapEventDetailTranslated] : undefined}>
|
||||||
<Tag color={actionToColor(t.event)}>
|
<Tag color={actionToColor(t.event)}>
|
||||||
{rdapEventNameTranslated[t.event as keyof typeof rdapEventNameTranslated]}
|
{rdapEventNameTranslated[t.event as keyof typeof rdapEventNameTranslated]}
|
||||||
</Tag>
|
</Tag>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)
|
)}
|
||||||
}]}
|
</Col>
|
||||||
{...(sm ? {scroll: {y: 'max-content'}} : {scroll: {y: 240}})}
|
</Row>
|
||||||
/>
|
|
||||||
</Card>
|
</Card>
|
||||||
<Divider/>
|
<Divider/>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@ -177,7 +177,7 @@ readonly class RDAPService
|
|||||||
$tld = strtolower(idn_to_ascii(substr($domain, $lastDotPosition + 1)));
|
$tld = strtolower(idn_to_ascii(substr($domain, $lastDotPosition + 1)));
|
||||||
$tldEntity = $this->tldRepository->findOneBy(['tld' => $tld]);
|
$tldEntity = $this->tldRepository->findOneBy(['tld' => $tld]);
|
||||||
if (null === $tldEntity) {
|
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;
|
return $tldEntity;
|
||||||
|
|||||||
@ -43,7 +43,7 @@ msgstr ""
|
|||||||
#: assets/components/LoginForm.tsx:62
|
#: assets/components/LoginForm.tsx:62
|
||||||
#: assets/components/RegisterForm.tsx:41
|
#: assets/components/RegisterForm.tsx:41
|
||||||
#: assets/components/RegisterForm.tsx:49
|
#: 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:43
|
||||||
#: assets/components/tracking/connector/ConnectorForm.tsx:69
|
#: assets/components/tracking/connector/ConnectorForm.tsx:69
|
||||||
#: assets/components/tracking/connector/ConnectorForm.tsx:77
|
#: assets/components/tracking/connector/ConnectorForm.tsx:77
|
||||||
@ -109,7 +109,7 @@ msgstr ""
|
|||||||
msgid "Entities"
|
msgid "Entities"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/components/search/DomainSearchBar.tsx:23
|
#: assets/components/search/DomainSearchBar.tsx:24
|
||||||
#: assets/components/tracking/watchlist/WatchlistForm.tsx:118
|
#: assets/components/tracking/watchlist/WatchlistForm.tsx:118
|
||||||
msgid "This domain name does not appear to be valid"
|
msgid "This domain name does not appear to be valid"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -514,11 +514,11 @@ msgstr ""
|
|||||||
msgid "Sorry, the page you visited does not exist."
|
msgid "Sorry, the page you visited does not exist."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/pages/search/DomainSearchPage.tsx:28
|
#: assets/pages/search/DomainSearchPage.tsx:24
|
||||||
msgid "Found !"
|
msgid "Found !"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: assets/pages/search/DomainSearchPage.tsx:44
|
#: assets/pages/search/DomainSearchPage.tsx:46
|
||||||
msgid ""
|
msgid ""
|
||||||
"Although the domain exists in my database, it has been deleted from the "
|
"Although the domain exists in my database, it has been deleted from the "
|
||||||
"WHOIS by its registrar."
|
"WHOIS by its registrar."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user