From 6770b1fa72273f7a7eb7f19cdd3ec830aa8aadc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Tue, 19 Apr 2022 16:33:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=9F=E5=90=8D=E8=A7=A3=E6=9E=90=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0GoDaddy=20DNS=EF=BC=88=E7=9B=AE=E5=89=8D=E4=BB=85?= =?UTF-8?q?=E5=95=86=E4=B8=9A=E7=89=88=E5=8F=AF=E7=94=A8=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/dns/providers/createPopup.go | 17 +++++++++------ .../default/dns/providers/updatePopup.go | 15 +++++++------ .../@default/dns/providers/createPopup.html | 21 +++++++++++++++++-- .../@default/dns/providers/provider.html | 14 +++++++++++++ .../@default/dns/providers/updatePopup.html | 21 +++++++++++++++++-- 5 files changed, 72 insertions(+), 16 deletions(-) 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 * + + + + + +