diff --git a/internal/web/actions/default/dns/providers/createPopup.go b/internal/web/actions/default/dns/providers/createPopup.go index b3bb2c17..e90c6cc7 100644 --- a/internal/web/actions/default/dns/providers/createPopup.go +++ b/internal/web/actions/default/dns/providers/createPopup.go @@ -1,3 +1,8 @@ +// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. + +//go:build !plus +// +build !plus + package providers import ( @@ -77,8 +82,8 @@ func (this *CreatePopupAction) RunPost(params struct { ParamApiSecret string // CloudFlare - CloudFlareAPIKey string - CloudFlareEmail string + ParamCloudFlareAPIKey string + ParamCloudFlareEmail string // Local EdgeDNS ParamLocalEdgeDNSClusterId int64 @@ -137,12 +142,12 @@ func (this *CreatePopupAction) RunPost(params struct { apiParams["apiSecret"] = params.ParamApiSecret case "cloudFlare": params.Must. - Field("cloudFlareAPIKey", params.CloudFlareAPIKey). + Field("paramCloudFlareAPIKey", params.ParamCloudFlareAPIKey). Require("请输入API密钥"). - Field("cloudFlareEmail", params.CloudFlareEmail). + Field("paramCloudFlareEmail", params.ParamCloudFlareEmail). Email("请输入正确格式的邮箱地址") - apiParams["apiKey"] = params.CloudFlareAPIKey - apiParams["email"] = params.CloudFlareEmail + apiParams["apiKey"] = params.ParamCloudFlareAPIKey + apiParams["email"] = params.ParamCloudFlareEmail case "localEdgeDNS": params.Must. Field("ParamLocalEdgeDNSClusterId", params.ParamLocalEdgeDNSClusterId). diff --git a/internal/web/actions/default/dns/providers/updatePopup.go b/internal/web/actions/default/dns/providers/updatePopup.go index e3922220..10e9d6d3 100644 --- a/internal/web/actions/default/dns/providers/updatePopup.go +++ b/internal/web/actions/default/dns/providers/updatePopup.go @@ -1,3 +1,6 @@ +//go:build !plus +// +build !plus + package providers import ( @@ -106,8 +109,8 @@ func (this *UpdatePopupAction) RunPost(params struct { ParamApiSecret string // CloudFlare - CloudFlareAPIKey string - CloudFlareEmail string + ParamCloudFlareAPIKey string + ParamCloudFlareEmail string // Local EdgeDNS ParamLocalEdgeDNSClusterId int64 @@ -168,12 +171,12 @@ func (this *UpdatePopupAction) RunPost(params struct { apiParams["apiSecret"] = params.ParamApiSecret case "cloudFlare": params.Must. - Field("cloudFlareAPIKey", params.CloudFlareAPIKey). + Field("paramCloudFlareAPIKey", params.ParamCloudFlareAPIKey). Require("请输入API密钥"). - Field("cloudFlareEmail", params.CloudFlareEmail). + Field("paramCloudFlareEmail", params.ParamCloudFlareEmail). Email("请输入正确格式的邮箱地址") - apiParams["apiKey"] = params.CloudFlareAPIKey - apiParams["email"] = params.CloudFlareEmail + apiParams["apiKey"] = params.ParamCloudFlareAPIKey + apiParams["email"] = params.ParamCloudFlareEmail case "localEdgeDNS": params.Must. Field("ParamLocalEdgeDNSClusterId", params.ParamLocalEdgeDNSClusterId). diff --git a/web/views/@default/dns/providers/createPopup.html b/web/views/@default/dns/providers/createPopup.html index 28ef0b41..ef3ffe4a 100644 --- a/web/views/@default/dns/providers/createPopup.html +++ b/web/views/@default/dns/providers/createPopup.html @@ -93,14 +93,14 @@ API密钥 * - +

在个人资料中的"API令牌"--"API密钥"--"Global API Key"中获取。

账号邮箱 * - +

登录账号使用的邮箱。

@@ -124,6 +124,23 @@ + + + + Key * + + +

可以在GoDaddy开发者中心添加。

+ + + + Secret * + + + + + + diff --git a/web/views/@default/dns/providers/provider.html b/web/views/@default/dns/providers/provider.html index ad96b2a4..9d8a3464 100644 --- a/web/views/@default/dns/providers/provider.html +++ b/web/views/@default/dns/providers/provider.html @@ -76,6 +76,20 @@ + + + + Key + + {{provider.apiParams.key}} + + + + Secret + {{provider.apiParams.secret}} + + + diff --git a/web/views/@default/dns/providers/updatePopup.html b/web/views/@default/dns/providers/updatePopup.html index fc218cbd..a22adf8c 100644 --- a/web/views/@default/dns/providers/updatePopup.html +++ b/web/views/@default/dns/providers/updatePopup.html @@ -93,19 +93,36 @@ API密钥 * - +

在个人资料中的"API令牌"--"API密钥"--"Global API Key"中获取。

账号邮箱 * - +

登录账号使用的邮箱。

+ + + + Key * + + +

可以在GoDaddy开发者中心添加。

+ + + + Secret * + + + + + +