Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MaxKey单点登录官方(MaxKeyTop)
MaxKey
提交
8a3c792b
MaxKey
项目概览
MaxKey单点登录官方(MaxKeyTop)
/
MaxKey
9 个月 前同步成功
通知
75
Star
3
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MaxKey
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
8a3c792b
编写于
4月 26, 2022
作者:
M
MaxKey
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
register
上级
ffa1607c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
33 addition
and
32 deletion
+33
-32
maxkey-web-frontend/maxkey-web-app/src/app/routes/passport/register/register.component.html
.../src/app/routes/passport/register/register.component.html
+12
-23
maxkey-web-frontend/maxkey-web-app/src/app/routes/passport/register/register.component.ts
...pp/src/app/routes/passport/register/register.component.ts
+17
-7
maxkey-web-frontend/maxkey-web-app/src/assets/i18n/en-US.json
...ey-web-frontend/maxkey-web-app/src/assets/i18n/en-US.json
+2
-1
maxkey-web-frontend/maxkey-web-app/src/assets/i18n/zh-CN.json
...ey-web-frontend/maxkey-web-app/src/assets/i18n/zh-CN.json
+2
-1
未找到文件。
maxkey-web-frontend/maxkey-web-app/src/app/routes/passport/register/register.component.html
浏览文件 @
8a3c792b
...
@@ -2,40 +2,31 @@
...
@@ -2,40 +2,31 @@
<form
nz-form
[formGroup]=
"form"
(ngSubmit)=
"submit()"
role=
"form"
>
<form
nz-form
[formGroup]=
"form"
(ngSubmit)=
"submit()"
role=
"form"
>
<nz-alert
*ngIf=
"error"
[nzType]=
"'error'"
[nzMessage]=
"error"
[nzShowIcon]=
"true"
class=
"mb-lg"
></nz-alert>
<nz-alert
*ngIf=
"error"
[nzType]=
"'error'"
[nzMessage]=
"error"
[nzShowIcon]=
"true"
class=
"mb-lg"
></nz-alert>
<nz-form-item>
<nz-form-item>
<nz-form-control
[nzErrorTip]=
"
mailErrorTip
"
>
<nz-form-control
[nzErrorTip]=
""
>
<nz-input-group
nzSize=
"large"
nzAddonBeforeIcon=
"user"
>
<nz-input-group
nzSize=
"large"
nzAddonBeforeIcon=
"user"
>
<input
nz-input
formControlName=
"username"
placeholder=
"
username
"
/>
<input
nz-input
formControlName=
"username"
placeholder=
"
{{ 'mxk.users.username' | i18n }}
"
/>
</nz-input-group>
</nz-input-group>
<ng-template
#mailErrorTip
let-i
>
<ng-container
*ngIf=
"i.errors?.required"
>
{{ 'validation.email.required' | i18n }}
</ng-container>
<ng-container
*ngIf=
"i.errors?.email"
>
{{ 'validation.email.wrong-format' | i18n }}
</ng-container>
</ng-template>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-control
[nzErrorTip]=
"
mailErrorTip
"
>
<nz-form-control
[nzErrorTip]=
""
>
<nz-input-group
nzSize=
"large"
nzAddonBeforeIcon=
"user"
>
<nz-input-group
nzSize=
"large"
nzAddonBeforeIcon=
"user"
>
<input
nz-input
formControlName=
"displayName"
placeholder=
"
displayName
"
/>
<input
nz-input
formControlName=
"displayName"
placeholder=
"
{{ 'mxk.users.displayName' | i18n }}
"
/>
</nz-input-group>
</nz-input-group>
<ng-template
#mailErrorTip
let-i
>
<ng-container
*ngIf=
"i.errors?.required"
>
{{ 'validation.email.required' | i18n }}
</ng-container>
<ng-container
*ngIf=
"i.errors?.email"
>
{{ 'validation.email.wrong-format' | i18n }}
</ng-container>
</ng-template>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-control
[nzErrorTip]=
"mailErrorTip"
>
<nz-form-control
[nzErrorTip]=
"mailErrorTip"
>
<nz-input-group
nzSize=
"large"
nzAddonBeforeIcon=
"user"
>
<nz-input-group
nzSize=
"large"
nzAddonBeforeIcon=
"user"
>
<input
nz-input
formControlName=
"
mail"
placeholder=
"Email
"
/>
<input
nz-input
formControlName=
"
email"
placeholder=
"{{ 'mxk.users.email' | i18n }}
"
/>
</nz-input-group>
</nz-input-group>
<ng-template
#mailErrorTip
let-i
>
<ng-template
#mailErrorTip
let-i
>
<ng-container
*ngIf=
"i.errors?.required"
>
{{ 'validation.email.required' | i18n }}
</ng-container>
<ng-container
*ngIf=
"i.errors?.email"
>
{{ 'validation.email.wrong-format' | i18n }}
</ng-container>
<ng-container
*ngIf=
"i.errors?.email"
>
{{ 'validation.email.wrong-format' | i18n }}
</ng-container>
</ng-template>
</ng-template>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-control
[nzErrorTip]=
"
'validation.password.required' | i18n
"
>
<nz-form-control
[nzErrorTip]=
""
>
<nz-input-group
<nz-input-group
nzSize=
"large"
nzSize=
"large"
nzAddonBeforeIcon=
"lock"
nzAddonBeforeIcon=
"lock"
...
@@ -47,7 +38,7 @@
...
@@ -47,7 +38,7 @@
[nzPopoverOverlayStyle]=
"{ 'width.px': 240 }"
[nzPopoverOverlayStyle]=
"{ 'width.px': 240 }"
[nzPopoverContent]=
"pwdCdkTpl"
[nzPopoverContent]=
"pwdCdkTpl"
>
>
<input
nz-input
type=
"password"
formControlName=
"password"
placeholder=
"
Password
"
/>
<input
nz-input
type=
"password"
formControlName=
"password"
placeholder=
"
{{ 'mxk.password.password' | i18n }}
"
/>
</nz-input-group>
</nz-input-group>
<ng-template
#pwdCdkTpl
>
<ng-template
#pwdCdkTpl
>
<div
style=
"padding: 4px 0"
>
<div
style=
"padding: 4px 0"
>
...
@@ -72,10 +63,9 @@
...
@@ -72,10 +63,9 @@
<nz-form-item>
<nz-form-item>
<nz-form-control
[nzErrorTip]=
"confirmErrorTip"
>
<nz-form-control
[nzErrorTip]=
"confirmErrorTip"
>
<nz-input-group
nzSize=
"large"
nzAddonBeforeIcon=
"lock"
>
<nz-input-group
nzSize=
"large"
nzAddonBeforeIcon=
"lock"
>
<input
nz-input
type=
"password"
formControlName=
"confirm"
placeholder=
"
Confirm Password
"
/>
<input
nz-input
type=
"password"
formControlName=
"confirm"
placeholder=
"
{{ 'mxk.password.confirmPassword' | i18n }}
"
/>
</nz-input-group>
</nz-input-group>
<ng-template
#confirmErrorTip
let-i
>
<ng-template
#confirmErrorTip
let-i
>
<ng-container
*ngIf=
"i.errors?.required"
>
{{ 'validation.confirm-password.required' | i18n }}
</ng-container>
<ng-container
*ngIf=
"i.errors?.matchControl"
>
{{ 'validation.password.twice' | i18n }}
</ng-container>
<ng-container
*ngIf=
"i.errors?.matchControl"
>
{{ 'validation.password.twice' | i18n }}
</ng-container>
</ng-template>
</ng-template>
</nz-form-control>
</nz-form-control>
...
@@ -89,24 +79,23 @@
...
@@ -89,24 +79,23 @@
<nz-option
[nzLabel]=
"'+87'"
[nzValue]=
"'+87'"
></nz-option>
<nz-option
[nzLabel]=
"'+87'"
[nzValue]=
"'+87'"
></nz-option>
</nz-select>
</nz-select>
</ng-template>
</ng-template>
<input
formControlName=
"mobile"
nz-input
placeholder=
"
Phone number
"
/>
<input
formControlName=
"mobile"
nz-input
placeholder=
"
{{ 'mxk.users.mobile' | i18n }}
"
/>
</nz-input-group>
</nz-input-group>
<ng-template
#mobileErrorTip
let-i
>
<ng-template
#mobileErrorTip
let-i
>
<ng-container
*ngIf=
"i.errors?.required"
>
{{ 'validation.phone-number.required' | i18n }}
</ng-container>
<ng-container
*ngIf=
"i.errors?.pattern"
>
{{ 'validation.phone-number.wrong-format' | i18n }}
</ng-container>
<ng-container
*ngIf=
"i.errors?.pattern"
>
{{ 'validation.phone-number.wrong-format' | i18n }}
</ng-container>
</ng-template>
</ng-template>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-control
[nzErrorTip]=
"
'validation.verification-code.required' | i18n
"
>
<nz-form-control
[nzErrorTip]=
""
>
<nz-row
[nzGutter]=
"8"
>
<nz-row
[nzGutter]=
"8"
>
<nz-col
[nzSpan]=
"16"
>
<nz-col
[nzSpan]=
"16"
>
<nz-input-group
nzSize=
"large"
nzAddonBeforeIcon=
"mail"
>
<nz-input-group
nzSize=
"large"
nzAddonBeforeIcon=
"mail"
>
<input
nz-input
formControlName=
"captcha"
placeholder=
"
Captcha
"
/>
<input
nz-input
formControlName=
"captcha"
placeholder=
"
{{ 'mxk.password.captcha' | i18n }}
"
/>
</nz-input-group>
</nz-input-group>
</nz-col>
</nz-col>
<nz-col
[nzSpan]=
"8"
>
<nz-col
[nzSpan]=
"8"
>
<button
type=
"button"
nz-button
nzSize=
"large"
(click)=
"getCaptcha()"
[disabled]=
"count > 0"
nzBlock
[nzLoading]=
"
l
oading"
>
<button
type=
"button"
nz-button
nzSize=
"large"
(click)=
"getCaptcha()"
[disabled]=
"count > 0"
nzBlock
[nzLoading]=
"
captchaL
oading"
>
{{ count ? count + 's' : ('app.register.get-verification-code' | i18n) }}
{{ count ? count + 's' : ('app.register.get-verification-code' | i18n) }}
</button>
</button>
</nz-col>
</nz-col>
...
...
maxkey-web-frontend/maxkey-web-app/src/app/routes/passport/register/register.component.ts
浏览文件 @
8a3c792b
...
@@ -69,6 +69,7 @@ export class UserRegisterComponent implements OnDestroy {
...
@@ -69,6 +69,7 @@ export class UserRegisterComponent implements OnDestroy {
error
=
''
;
error
=
''
;
type
=
0
;
type
=
0
;
loading
=
false
;
loading
=
false
;
captchaLoading
=
false
;
visible
=
false
;
visible
=
false
;
status
=
'
pool
'
;
status
=
'
pool
'
;
progress
=
0
;
progress
=
0
;
...
@@ -111,13 +112,22 @@ export class UserRegisterComponent implements OnDestroy {
...
@@ -111,13 +112,22 @@ export class UserRegisterComponent implements OnDestroy {
this
.
mobile
.
updateValueAndValidity
({
onlySelf
:
true
});
this
.
mobile
.
updateValueAndValidity
({
onlySelf
:
true
});
return
;
return
;
}
}
this
.
signUpService
.
produceOtp
({
mobile
:
this
.
mobile
.
value
}).
subscribe
(
res
=>
{
this
.
captchaLoading
=
true
;
if
(
res
.
code
!==
0
)
{
this
.
signUpService
this
.
msg
.
success
(
`短信发送失败`
);
.
produceOtp
({
mobile
:
this
.
mobile
.
value
})
this
.
cdr
.
detectChanges
();
.
pipe
(
}
finalize
(()
=>
{
this
.
msg
.
success
(
`短信发送成功`
);
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
.
count
=
59
;
this
.
cdr
.
detectChanges
();
this
.
cdr
.
detectChanges
();
this
.
interval$
=
setInterval
(()
=>
{
this
.
interval$
=
setInterval
(()
=>
{
...
...
maxkey-web-frontend/maxkey-web-app/src/assets/i18n/en-US.json
浏览文件 @
8a3c792b
...
@@ -249,7 +249,8 @@
...
@@ -249,7 +249,8 @@
"username"
:
"Username"
,
"username"
:
"Username"
,
"oldPassword"
:
"Old Password"
,
"oldPassword"
:
"Old Password"
,
"password"
:
"New Password"
,
"password"
:
"New Password"
,
"confirmPassword"
:
"Confirm Password"
"confirmPassword"
:
"Confirm Password"
,
"captcha"
:
"Captcha"
},
},
"ldapcontext"
:{
"ldapcontext"
:{
"product"
:
"product"
,
"product"
:
"product"
,
...
...
maxkey-web-frontend/maxkey-web-app/src/assets/i18n/zh-CN.json
浏览文件 @
8a3c792b
...
@@ -542,7 +542,8 @@
...
@@ -542,7 +542,8 @@
"username"
:
"账号"
,
"username"
:
"账号"
,
"oldPassword"
:
"当前密码"
,
"oldPassword"
:
"当前密码"
,
"password"
:
"新密码"
,
"password"
:
"新密码"
,
"confirmPassword"
:
"确认密码"
"confirmPassword"
:
"确认密码"
,
"captcha"
:
"验证码"
},
},
"socialsproviders"
:{
"socialsproviders"
:{
"icon"
:
"图标"
,
"icon"
:
"图标"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录