mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-05 18:20:37 +01:00
Merge pull request #18 from steven-zou/fix/issues
fix issue of package.json
This commit is contained in:
commit
e4106aa05c
@ -37,6 +37,7 @@
|
||||
"zone.js": "^0.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/compiler-cli": "^2.4.1",
|
||||
"@angular/cli": "^1.0.0",
|
||||
"@types/core-js": "^0.9.34",
|
||||
"@types/jasmine": "^2.2.30",
|
||||
|
@ -7,10 +7,10 @@
|
||||
<section class="form-block">
|
||||
<div class="form-group form-group-override">
|
||||
<label for="reset_pwd_email" class="required form-group-label-override">{{'RESET_PWD.EMAIL' | translate}}</label>
|
||||
<label for="reset_pwd_email" aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-bottom-left" [class.invalid]="validationState === false">
|
||||
<input name="reset_pwd_email" type="text" #eamilInput="ngModel" [(ngModel)]="email"
|
||||
<label for="reset_pwd_email" aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-md tooltip-bottom-left" [class.invalid]="!validationState">
|
||||
<input [disabled]="isSuccess" name="reset_pwd_email" type="text" #eamilInput="ngModel" [(ngModel)]="email"
|
||||
required
|
||||
pattern='^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$'
|
||||
email
|
||||
id="reset_pwd_email"
|
||||
size="40"
|
||||
(input)="handleValidation(true)"
|
||||
@ -25,7 +25,7 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<span class="spinner spinner-inline" style="top:8px;" [hidden]="showProgress === false"></span>
|
||||
<button type="button" class="btn btn-outline" (click)="close()">{{'BUTTON.CANCEL' | translate}}</button>
|
||||
<button type="button" class="btn btn-primary" [disabled]="!isValid || showProgress" (click)="send()">{{'BUTTON.SEND' | translate}}</button>
|
||||
<button type="button" class="btn btn-outline" (click)="close()">{{btnCancelCaption | translate}}</button>
|
||||
<button *ngIf="!isSuccess" type="button" class="btn btn-primary" [disabled]="!isValid || showProgress" (click)="send()">{{'BUTTON.SEND' | translate}}</button>
|
||||
</div>
|
||||
</clr-modal>
|
@ -15,7 +15,7 @@ export class ForgotPasswordComponent {
|
||||
private onGoing: boolean = false;
|
||||
private email: string = "";
|
||||
private validationState: boolean = true;
|
||||
private forceValid: boolean = true;
|
||||
private isSuccess: boolean = false;
|
||||
|
||||
@ViewChild("forgotPasswordFrom") forgotPwdForm: NgForm;
|
||||
@ViewChild(InlineAlertComponent)
|
||||
@ -28,13 +28,21 @@ export class ForgotPasswordComponent {
|
||||
}
|
||||
|
||||
public get isValid(): boolean {
|
||||
return this.forgotPwdForm && this.forgotPwdForm.valid && this.forceValid;
|
||||
return this.forgotPwdForm && this.forgotPwdForm.valid ;
|
||||
}
|
||||
|
||||
public get btnCancelCaption(): string {
|
||||
if(this.isSuccess){
|
||||
return "BUTTON.CLOSE";
|
||||
}
|
||||
|
||||
return "BUTTON.CANCEL";
|
||||
}
|
||||
|
||||
public open(): void {
|
||||
//Clear state data
|
||||
this.validationState = true;
|
||||
this.forceValid = true;
|
||||
this.isSuccess = false;
|
||||
this.onGoing = false;
|
||||
this.email = "";
|
||||
this.forgotPwdForm.resetForm();
|
||||
@ -61,7 +69,7 @@ export class ForgotPasswordComponent {
|
||||
this.pwdService.sendResetPasswordMail(this.email)
|
||||
.then(response => {
|
||||
this.onGoing = false;
|
||||
this.forceValid = false;//diable the send button
|
||||
this.isSuccess = true;
|
||||
this.inlineAlert.showInlineSuccess({
|
||||
message: "RESET_PWD.SUCCESS"
|
||||
});
|
||||
|
@ -320,13 +320,13 @@
|
||||
"COPY": "Copy"
|
||||
},
|
||||
"ALERT": {
|
||||
"FORM_CHANGE_CONFIRMATION": "Some changes are not saved yet, do you want to cancel?"
|
||||
"FORM_CHANGE_CONFIRMATION": "Some changes are not saved yet. Do you want to cancel?"
|
||||
},
|
||||
"RESET_PWD": {
|
||||
"TITLE": "Reset Password",
|
||||
"CAPTION": "Enter your email to reset your password",
|
||||
"EMAIL": "Email",
|
||||
"SUCCESS": "Mail of resetting password is successfully send to your mail box",
|
||||
"SUCCESS": "Mail with password resetting is successfully sent. You can close this dialog and check your mailbox now.",
|
||||
"CAPTION2": "Enter your new password",
|
||||
"RESET_OK": "Password has been successfully reset. Click OK to login with new password"
|
||||
},
|
||||
@ -387,7 +387,7 @@
|
||||
"TEST_MAIL_FAILED": "Failed to verify mail server with error: {{param}}",
|
||||
"TEST_LDAP_FAILED": "Failed to verify LDAP server with error: {{param}}",
|
||||
"LEAVING_CONFIRMATION_TITLE": "Confirm to leave",
|
||||
"LEAVING_CONFIRMATION_SUMMARY": "Changes have not been saved yet, do you want to leave currnet page?"
|
||||
"LEAVING_CONFIRMATION_SUMMARY": "Changes have not been saved yet. Do you want to leave currnet page?"
|
||||
},
|
||||
"PAGE_NOT_FOUND": {
|
||||
"MAIN_TITLE": "Page not found",
|
||||
|
@ -326,7 +326,7 @@
|
||||
"TITLE": "重置密码",
|
||||
"CAPTION": "输入用来重置密码的邮箱",
|
||||
"EMAIL": "邮箱",
|
||||
"SUCCESS": "重置密码邮件已成功发送",
|
||||
"SUCCESS": "重置密码邮件已成功发送. 请关闭对话框并检查邮箱",
|
||||
"CAPTION2": "请输入您的新密码",
|
||||
"RESET_OK": "密码重置成功,点击确定按钮前往登录页登录"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user