mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-26 12:25:20 +01:00
Use api action directive for confirm action (#1153)
This commit is contained in:
parent
8180aaa4cc
commit
c82d1b3c50
@ -253,11 +253,10 @@ export abstract class BasePeopleComponent<UserType extends ProviderUserUserDetai
|
|||||||
comp.publicKey = publicKey;
|
comp.publicKey = publicKey;
|
||||||
comp.onConfirmedUser.subscribe(async () => {
|
comp.onConfirmedUser.subscribe(async () => {
|
||||||
try {
|
try {
|
||||||
await confirmUser(publicKey);
|
comp.formPromise = confirmUser(publicKey);
|
||||||
|
await comp.formPromise;
|
||||||
modal.close();
|
modal.close();
|
||||||
} catch (e) {
|
} catch { }
|
||||||
this.logService.error(`Handled exception: ${e}`);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div class="modal fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="confirmUserTitle">
|
<div class="modal fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="confirmUserTitle">
|
||||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
<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">
|
<div class="modal-header">
|
||||||
<h2 class="modal-title" id="confirmUserTitle">
|
<h2 class="modal-title" id="confirmUserTitle">
|
||||||
{{'confirmUser' | i18n}}
|
{{'confirmUser' | i18n}}
|
||||||
|
@ -24,6 +24,7 @@ export class UserConfirmComponent implements OnInit {
|
|||||||
dontAskAgain = false;
|
dontAskAgain = false;
|
||||||
loading = true;
|
loading = true;
|
||||||
fingerprint: string;
|
fingerprint: string;
|
||||||
|
formPromise: Promise<any>;
|
||||||
|
|
||||||
constructor(private cryptoService: CryptoService, private storageService: StorageService) { }
|
constructor(private cryptoService: CryptoService, private storageService: StorageService) { }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user