diff --git a/angular/src/components/verify-master-password.component.html b/angular/src/components/verify-master-password.component.html index ff34926a30..19132c15b5 100644 --- a/angular/src/components/verify-master-password.component.html +++ b/angular/src/components/verify-master-password.component.html @@ -5,14 +5,20 @@
- + + + {{'codeSent' | i18n}} +
+ {{'confirmIdentity' | i18n}}
diff --git a/angular/src/components/verify-master-password.component.ts b/angular/src/components/verify-master-password.component.ts index 9d8bca633f..1975b4e200 100644 --- a/angular/src/components/verify-master-password.component.ts +++ b/angular/src/components/verify-master-password.component.ts @@ -1,3 +1,9 @@ +import { + animate, + style, + transition, + trigger, +} from '@angular/animations'; import { Component, OnInit, @@ -25,10 +31,19 @@ import { Verification } from 'jslib-common/types/verification'; useExisting: VerifyMasterPasswordComponent, }, ], + animations: [ + trigger('sent', [ + transition(':enter', [ + style({ opacity: 0 }), + animate('100ms', style({ opacity: 1 })), + ]), + ]), + ], }) export class VerifyMasterPasswordComponent implements ControlValueAccessor, OnInit { usesKeyConnector: boolean = false; disableRequestOTP: boolean = false; + sentCode: boolean = false; secret = new FormControl(''); @@ -47,7 +62,12 @@ export class VerifyMasterPasswordComponent implements ControlValueAccessor, OnIn async requestOTP() { if (this.usesKeyConnector) { this.disableRequestOTP = true; - await this.userVerificationService.requestOTP(); + try { + await this.userVerificationService.requestOTP(); + this.sentCode = true; + } finally { + this.disableRequestOTP = false; + } } }