63 lines
2.7 KiB
TypeScript
Raw Normal View History

2024-12-30 23:50:15 +01:00
import {ConnectorProvider} from '../api/connectors'
import {Typography} from 'antd'
import {t} from 'ttag'
import React from 'react'
2024-07-30 17:48:09 +02:00
export const helpGetTokenLink = (provider?: string) => {
switch (provider) {
2025-01-06 22:58:00 +01:00
case ConnectorProvider.OVHcloud:
2024-12-30 23:50:15 +01:00
return (
<Typography.Link
target='_blank'
href='https://api.ovh.com/createToken/?GET=/order/cart&GET=/order/cart/*&POST=/order/cart&POST=/order/cart/*&DELETE=/order/cart/*&GET=/domain/extensions'
>
{t`Retrieve a set of tokens from your customer account on the Provider's website`}
</Typography.Link>
)
2024-08-06 03:38:00 +02:00
2025-01-06 22:58:00 +01:00
case ConnectorProvider.Gandi:
2024-12-30 23:50:15 +01:00
return (
<Typography.Link target='_blank' href='https://admin.gandi.net/organizations/account/pat'>
{t`Retrieve a Personal Access Token from your customer account on the Provider's website`}
</Typography.Link>
)
2025-01-06 22:58:00 +01:00
case ConnectorProvider.Namecheap:
2024-12-30 23:50:15 +01:00
return (
<Typography.Link target='_blank' href='https://ap.www.namecheap.com/settings/tools/apiaccess/'>
{t`Retreive an API key and whitelist this instance's IP address on Namecheap's website`}
</Typography.Link>
)
2025-01-06 22:58:00 +01:00
case ConnectorProvider.AutoDNS:
2024-12-30 23:50:15 +01:00
return (
<Typography.Link target='_blank' href='https://en.autodns.com/domain-robot-api/'>
{t`Because of some limitations in API of AutoDNS, we suggest to create an dedicated user for API with limited rights`}
</Typography.Link>
)
2025-01-06 22:58:00 +01:00
case ConnectorProvider['Name.com']:
return (
<Typography.Link target='_blank' href='https://www.name.com/account/settings/api'>
{t`Retrieve a set of tokens from your customer account on the Provider's website`}
</Typography.Link>
)
2024-07-30 17:48:09 +02:00
default:
return <></>
}
}
export const tosHyperlink = (provider?: string) => {
switch (provider) {
2025-01-06 22:58:00 +01:00
case ConnectorProvider.OVHcloud:
return 'https://www.ovhcloud.com/en/terms-and-conditions/contracts/'
case ConnectorProvider.Gandi:
2024-08-06 03:38:00 +02:00
return 'https://www.gandi.net/en/contracts/terms-of-service'
2025-01-06 22:58:00 +01:00
case ConnectorProvider.Namecheap:
return 'https://www.namecheap.com/legal/universal/universal-tos/'
2025-01-06 22:58:00 +01:00
case ConnectorProvider.AutoDNS:
2024-09-22 18:33:22 +02:00
return 'https://www.internetx.com/agb/'
2025-01-06 22:58:00 +01:00
case ConnectorProvider['Name.com']:
return 'https://www.name.com/policies/'
2024-07-30 17:48:09 +02:00
default:
return ''
}
2024-12-30 23:50:15 +01:00
}