mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: add name.com support
This commit is contained in:
@@ -3,7 +3,8 @@ import {jt, t} from 'ttag'
|
||||
import {DeleteFilled} from '@ant-design/icons'
|
||||
import React from 'react'
|
||||
import type {Connector} from '../../../utils/api/connectors'
|
||||
import {deleteConnector} from '../../../utils/api/connectors'
|
||||
import { ConnectorProvider, deleteConnector} from '../../../utils/api/connectors'
|
||||
import {tosHyperlink} from "../../../utils/providers"
|
||||
|
||||
const {useToken} = theme
|
||||
|
||||
@@ -24,12 +25,13 @@ export function ConnectorsList({connectors, onDelete}: { connectors: ConnectorEl
|
||||
{new Date(connector.createdAt).toLocaleString()}
|
||||
</Typography.Text>
|
||||
const {watchlistCount} = connector
|
||||
const connectorName = Object.keys(ConnectorProvider).find(p => ConnectorProvider[p as keyof typeof ConnectorProvider] === connector.provider)
|
||||
|
||||
return <>
|
||||
{contextHolder}
|
||||
<Card
|
||||
hoverable title={<Space>
|
||||
{t`Connector ${connector.provider}`}<Typography.Text code>{connector.id}</Typography.Text>
|
||||
{t`Connector ${connectorName}`}<Typography.Text code>{connector.id}</Typography.Text>
|
||||
</Space>}
|
||||
size='small'
|
||||
style={{width: '100%'}}
|
||||
@@ -44,8 +46,16 @@ export function ConnectorsList({connectors, onDelete}: { connectors: ConnectorEl
|
||||
>
|
||||
<Typography.Paragraph>{jt`Creation date: ${createdAt}`}</Typography.Paragraph>
|
||||
<Typography.Paragraph>{t`Used in: ${watchlistCount} Watchlist`}</Typography.Paragraph>
|
||||
<Card.Meta description={t`You can stop using a connector at any time. To delete a connector, you must remove it from each linked Watchlist.
|
||||
The creation date corresponds to the date on which you consented to the creation of the connector and on which you declared in particular that you fulfilled the conditions of use of the supplier's API, waived the right of withdrawal and were of the minimum age to consent to these conditions.`}/>
|
||||
<Card.Meta description={
|
||||
<>
|
||||
{t`You can stop using a connector at any time. To delete a connector, you must remove it from each linked Watchlist.
|
||||
The creation date corresponds to the date on which you consented to the creation of the connector and on which you declared in particular that you fulfilled the conditions of use of the supplier's API, waived the right of withdrawal and were of the minimum age to consent to these conditions.`}
|
||||
|
||||
<Typography.Link href={tosHyperlink(connector.provider)}>
|
||||
{t`The Provider’s conditions are accessible by following this hyperlink.`}
|
||||
</Typography.Link>
|
||||
</>
|
||||
}/>
|
||||
</Card>
|
||||
<Divider/>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user