1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-24 08:33:29 +00:00

Changes suggested by Thomas R

This commit is contained in:
CarleyDiaz-Bitwarden
2022-08-01 18:21:47 -04:00
parent 370cbacd3e
commit 518fd23b43
13 changed files with 140 additions and 204 deletions

View File

@@ -14,14 +14,10 @@ import { ModalRef } from "./modal/modal.ref";
*/
@Directive()
export class UserVerificationPromptComponent {
showPassword = false;
organizationId = "";
confirmDescription = this.config.data.confirmDescription;
confirmButtonText = this.config.data.confirmButtonText;
modalTitle = this.config.data.modalTitle;
myGroup = this.formBuilder.group({
secret: new FormControl(),
});
secret = new FormControl();
constructor(
private modalRef: ModalRef,
@@ -32,16 +28,10 @@ export class UserVerificationPromptComponent {
private i18nService: I18nService
) {}
togglePassword() {
this.showPassword = !this.showPassword;
}
async submit() {
const secret = this.myGroup.get("secret").value;
try {
//Incorrect secret will throw an invalid password error.
await this.userVerificationService.verifyUser(secret);
await this.userVerificationService.verifyUser(this.secret.value);
} catch (e) {
this.platformUtilsService.showToast(
"error",