@@ -72,10 +63,9 @@
-
+
- {{ 'validation.confirm-password.required' | i18n }}
{{ 'validation.password.twice' | i18n }}
@@ -89,24 +79,23 @@
-
+
- {{ 'validation.phone-number.required' | i18n }}
{{ 'validation.phone-number.wrong-format' | i18n }}
-
+
-
+
-
diff --git a/maxkey-web-frontend/maxkey-web-app/src/app/routes/passport/register/register.component.ts b/maxkey-web-frontend/maxkey-web-app/src/app/routes/passport/register/register.component.ts
index b9a583749f13f39bae3cba9e5f08b04bf6347c37..674808a1b0882c2d6d609d83fc67b644c2acfbe1 100644
--- a/maxkey-web-frontend/maxkey-web-app/src/app/routes/passport/register/register.component.ts
+++ b/maxkey-web-frontend/maxkey-web-app/src/app/routes/passport/register/register.component.ts
@@ -69,6 +69,7 @@ export class UserRegisterComponent implements OnDestroy {
error = '';
type = 0;
loading = false;
+ captchaLoading = false;
visible = false;
status = 'pool';
progress = 0;
@@ -111,13 +112,22 @@ export class UserRegisterComponent implements OnDestroy {
this.mobile.updateValueAndValidity({ onlySelf: true });
return;
}
- this.signUpService.produceOtp({ mobile: this.mobile.value }).subscribe(res => {
- if (res.code !== 0) {
- this.msg.success(`短信发送失败`);
- this.cdr.detectChanges();
- }
- this.msg.success(`短信发送成功`);
- });
+ this.captchaLoading = true;
+ this.signUpService
+ .produceOtp({ mobile: this.mobile.value })
+ .pipe(
+ finalize(() => {
+ this.captchaLoading = false;
+ this.cdr.detectChanges();
+ })
+ )
+ .subscribe(res => {
+ if (res.code !== 0) {
+ this.msg.success(`短信发送失败`);
+ this.cdr.detectChanges();
+ }
+ this.msg.success(`短信发送成功`);
+ });
this.count = 59;
this.cdr.detectChanges();
this.interval$ = setInterval(() => {
diff --git a/maxkey-web-frontend/maxkey-web-app/src/assets/i18n/en-US.json b/maxkey-web-frontend/maxkey-web-app/src/assets/i18n/en-US.json
index 3b599a7b8ec4b14f5dcdf1667294278bdfec943f..3f4e1b6d8d8ba66e15cd8d97dcbf9b475a23049f 100644
--- a/maxkey-web-frontend/maxkey-web-app/src/assets/i18n/en-US.json
+++ b/maxkey-web-frontend/maxkey-web-app/src/assets/i18n/en-US.json
@@ -249,7 +249,8 @@
"username": "Username",
"oldPassword": "Old Password",
"password": "New Password",
- "confirmPassword": "Confirm Password"
+ "confirmPassword": "Confirm Password",
+ "captcha": "Captcha"
},
"ldapcontext":{
"product": "product",
diff --git a/maxkey-web-frontend/maxkey-web-app/src/assets/i18n/zh-CN.json b/maxkey-web-frontend/maxkey-web-app/src/assets/i18n/zh-CN.json
index e64f07315c408ebf3751e82a15af0e56976fb4dc..f5dae8add4499571dbb484292c16596294e7109e 100644
--- a/maxkey-web-frontend/maxkey-web-app/src/assets/i18n/zh-CN.json
+++ b/maxkey-web-frontend/maxkey-web-app/src/assets/i18n/zh-CN.json
@@ -542,7 +542,8 @@
"username": "账号",
"oldPassword": "当前密码",
"password": "新密码",
- "confirmPassword": "确认密码"
+ "confirmPassword": "确认密码",
+ "captcha": "验证码"
},
"socialsproviders":{
"icon" :"图标",