From 86838f305ba5672e48a58acdbf96446555732584 Mon Sep 17 00:00:00 2001 From: yoan <536464346@qq.com> Date: Sun, 27 Oct 2024 08:32:48 +0800 Subject: [PATCH] detail ajustments --- ui/src/components/certimate/DeployToTencentTEO.tsx | 8 ++++---- ui/src/i18n/locales/en/nls.common.json | 1 + ui/src/i18n/locales/zh/nls.common.json | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ui/src/components/certimate/DeployToTencentTEO.tsx b/ui/src/components/certimate/DeployToTencentTEO.tsx index cdd64280..80715fd1 100644 --- a/ui/src/components/certimate/DeployToTencentTEO.tsx +++ b/ui/src/components/certimate/DeployToTencentTEO.tsx @@ -33,7 +33,7 @@ const DeployToTencentTEO = () => { }, [data]); useEffect(() => { - const resp = ZoneIdSchema.safeParse(data.config?.zoneId); + const resp = zoneIdSchema.safeParse(data.config?.zoneId); if (!resp.success) { setError({ ...error, @@ -51,8 +51,8 @@ const DeployToTencentTEO = () => { message: t("common.errmsg.domain_invalid"), }); - const ZoneIdSchema = z.string().regex(/^zone-[0-9a-zA-Z]{9}$/, { - message: t("common.errmsg.domain_invalid"), + const zoneIdSchema = z.string().regex(/^zone-[0-9a-zA-Z]{9}$/, { + message: t("common.errmsg.zoneid_invalid"), }); return ( @@ -66,7 +66,7 @@ const DeployToTencentTEO = () => { onChange={(e) => { const temp = e.target.value; - const resp = ZoneIdSchema.safeParse(temp); + const resp = zoneIdSchema.safeParse(temp); if (!resp.success) { setError({ ...error, diff --git a/ui/src/i18n/locales/en/nls.common.json b/ui/src/i18n/locales/en/nls.common.json index 3af39b6d..5643b56e 100644 --- a/ui/src/i18n/locales/en/nls.common.json +++ b/ui/src/i18n/locales/en/nls.common.json @@ -51,6 +51,7 @@ "common.errmsg.host_invalid": "Please enter the correct domain name or IP", "common.errmsg.ip_invalid": "Please enter IP", "common.errmsg.url_invalid": "Please enter a valid URL", + "common.errmsg.zoneid_invalid": "Please enter Zone ID", "common.provider.aliyun": "Alibaba Cloud", "common.provider.aliyun.oss": "Alibaba Cloud - OSS", diff --git a/ui/src/i18n/locales/zh/nls.common.json b/ui/src/i18n/locales/zh/nls.common.json index abb829ed..44c4d749 100644 --- a/ui/src/i18n/locales/zh/nls.common.json +++ b/ui/src/i18n/locales/zh/nls.common.json @@ -51,6 +51,8 @@ "common.errmsg.host_invalid": "请输入正确的域名或 IP 地址", "common.errmsg.ip_invalid": "请输入正确的 IP 地址", "common.errmsg.url_invalid": "请输入正确的 URL", + "common.errmsg.zoneid_invalid": "请输入正确的 Zone ID", + "common.provider.aliyun": "阿里云", "common.provider.aliyun.oss": "阿里云 - OSS", "common.provider.aliyun.cdn": "阿里云 - CDN", @@ -81,3 +83,4 @@ "common.provider.telegram": "Telegram", "common.provider.lark": "飞书" } +