45 lines
2.1 KiB
TypeScript
Raw Normal View History

2024-07-30 17:48:09 +02:00
import {ConnectorProvider} from "../api/connectors";
import {Typography} from "antd";
import {t} from "ttag";
import React from "react";
export const helpGetTokenLink = (provider?: string) => {
switch (provider) {
case ConnectorProvider.OVH:
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">
2024-07-30 17:48:09 +02:00
{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
case ConnectorProvider.GANDI:
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>
2024-08-23 14:01:02 +02:00
case ConnectorProvider.NAMECHEAP:
2024-08-26 14:02:12 +02:00
return <Typography.Link target='_blank' href="https://ap.www.namecheap.com/settings/tools/apiaccess/">
2024-08-23 14:01:02 +02:00
{t`Retreive an API key and whitelist this instance's IP address on Namecheap's website`}
</Typography.Link>
2024-10-02 12:59:37 +02:00
case ConnectorProvider.AUTODNS:
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`}
2024-10-02 12:59:37 +02:00
</Typography.Link>
2024-07-30 17:48:09 +02:00
default:
return <></>
2024-08-06 03:38:00 +02:00
2024-07-30 17:48:09 +02:00
}
}
export const tosHyperlink = (provider?: string) => {
switch (provider) {
case ConnectorProvider.OVH:
return 'https://www.ovhcloud.com/fr/terms-and-conditions/contracts/'
2024-08-06 03:38:00 +02:00
case ConnectorProvider.GANDI:
return 'https://www.gandi.net/en/contracts/terms-of-service'
case ConnectorProvider.NAMECHEAP:
return 'https://www.namecheap.com/legal/universal/universal-tos/'
2024-09-22 18:33:22 +02:00
case ConnectorProvider.AUTODNS:
return 'https://www.internetx.com/agb/'
2024-07-30 17:48:09 +02:00
default:
return ''
}
}