Merge pull request #666 from fudiwei/feat/providers

new providers
This commit is contained in:
RHQYZ
2025-05-09 11:00:32 +08:00
committed by GitHub
49 changed files with 1632 additions and 213 deletions

View File

@@ -41,6 +41,7 @@ import { useAccessesStore } from "@/stores/access";
import { useContactEmailsStore } from "@/stores/contact";
import { validDomainName, validIPv4Address, validIPv6Address } from "@/utils/validators";
import ApplyNodeConfigFormAliyunESAConfig from "./ApplyNodeConfigFormAliyunESAConfig";
import ApplyNodeConfigFormAWSRoute53Config from "./ApplyNodeConfigFormAWSRoute53Config";
import ApplyNodeConfigFormHuaweiCloudDNSConfig from "./ApplyNodeConfigFormHuaweiCloudDNSConfig";
import ApplyNodeConfigFormJDCloudDNSConfig from "./ApplyNodeConfigFormJDCloudDNSConfig";
@@ -160,7 +161,7 @@ const ApplyNodeConfigForm = forwardRef<ApplyNodeConfigFormInstance, ApplyNodeCon
const [showProvider, setShowProvider] = useState(false);
useEffect(() => {
// 通常情况下每个授权信息只对应一个 DNS 提供商,此时无需显示 DNS 提供商字段;
// 如果对应多个(如 AWS 的 Route53、Lightsail腾讯云的 DNS、EdgeOne 等),则显示。
// 如果对应多个(如 AWS 的 Route53、Lightsail阿里云的 DNS、ESA腾讯云的 DNS、EdgeOne 等),则显示。
if (fieldProviderAccessId) {
const access = accesses.find((e) => e.id === fieldProviderAccessId);
const providers = Array.from(acmeDns01ProvidersMap.values()).filter((e) => e.provider === access?.provider);
@@ -196,6 +197,8 @@ const ApplyNodeConfigForm = forwardRef<ApplyNodeConfigFormInstance, ApplyNodeCon
NOTICE: If you add new child component, please keep ASCII order.
*/
switch (fieldProvider) {
case ACME_DNS01_PROVIDERS.ALIYUN_ESA:
return <ApplyNodeConfigFormAliyunESAConfig {...nestedFormProps} />;
case ACME_DNS01_PROVIDERS.AWS:
case ACME_DNS01_PROVIDERS.AWS_ROUTE53:
return <ApplyNodeConfigFormAWSRoute53Config {...nestedFormProps} />;