1
0
mirror of https://github.com/bitwarden/browser synced 2024-12-23 08:30:14 +01:00

Use api action directive for confirm action (#1153)

This commit is contained in:
Matt Gibson 2021-09-13 08:46:16 -04:00 committed by GitHub
parent 8180aaa4cc
commit c82d1b3c50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -253,11 +253,10 @@ export abstract class BasePeopleComponent<UserType extends ProviderUserUserDetai
comp.publicKey = publicKey;
comp.onConfirmedUser.subscribe(async () => {
try {
await confirmUser(publicKey);
comp.formPromise = confirmUser(publicKey);
await comp.formPromise;
modal.close();
} catch (e) {
this.logService.error(`Handled exception: ${e}`);
}
} catch { }
});
});
return;

View File

@ -1,6 +1,6 @@
<div class="modal fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="confirmUserTitle">
<div class="modal-dialog modal-dialog-scrollable" role="document">
<form class="modal-content" #form (ngSubmit)="submit()">
<form class="modal-content" #form (ngSubmit)="submit()" [appApiAction]="formPromise">
<div class="modal-header">
<h2 class="modal-title" id="confirmUserTitle">
{{'confirmUser' | i18n}}

View File

@ -24,6 +24,7 @@ export class UserConfirmComponent implements OnInit {
dontAskAgain = false;
loading = true;
fingerprint: string;
formPromise: Promise<any>;
constructor(private cryptoService: CryptoService, private storageService: StorageService) { }