diff --git a/apps/desktop/src/app/app.component.ts b/apps/desktop/src/app/app.component.ts index ad87230d39f..898d4bb1278 100644 --- a/apps/desktop/src/app/app.component.ts +++ b/apps/desktop/src/app/app.component.ts @@ -399,7 +399,11 @@ export class AppComponent implements OnInit, OnDestroy { break; case "openLoginApproval": if (message.notificationId != null) { - await this.openLoginApproval(message.notificationId); + this.dialogService.closeAll(); + const dialogRef = LoginApprovalComponent.open(this.dialogService, { + notificationId: message.notificationId, + }); + await firstValueFrom(dialogRef.closed); } break; case "redrawMenu": @@ -473,19 +477,6 @@ export class AppComponent implements OnInit, OnDestroy { }); } - async openLoginApproval(notificationId: string) { - this.modalService.closeAll(); - - this.modal = await this.modalService.open(LoginApprovalComponent, { - data: { notificationId: notificationId }, - }); - - // eslint-disable-next-line rxjs-angular/prefer-takeuntil - this.modal.onClosed.subscribe(() => { - this.modal = null; - }); - } - private async updateAppMenu() { let updateRequest: MenuUpdateRequest; const stateAccounts = await firstValueFrom(this.stateService.accounts$); diff --git a/apps/desktop/src/app/app.module.ts b/apps/desktop/src/app/app.module.ts index bb25500eb4c..6317b6aaaf4 100644 --- a/apps/desktop/src/app/app.module.ts +++ b/apps/desktop/src/app/app.module.ts @@ -14,7 +14,6 @@ import { DeleteAccountComponent } from "../auth/delete-account.component"; import { EnvironmentComponent } from "../auth/environment.component"; import { HintComponent } from "../auth/hint.component"; import { LockComponent } from "../auth/lock.component"; -import { LoginApprovalComponent } from "../auth/login/login-approval.component"; import { LoginModule } from "../auth/login/login.module"; import { RegisterComponent } from "../auth/register.component"; import { RemovePasswordComponent } from "../auth/remove-password.component"; @@ -101,7 +100,6 @@ import { SendComponent } from "./tools/send/send.component"; VaultTimeoutInputComponent, ViewComponent, ViewCustomFieldsComponent, - LoginApprovalComponent, ], bootstrap: [AppComponent], }) diff --git a/apps/desktop/src/auth/login/login-approval.component.html b/apps/desktop/src/auth/login/login-approval.component.html index 8a07c37f80b..cc2c0536c9e 100644 --- a/apps/desktop/src/auth/login/login-approval.component.html +++ b/apps/desktop/src/auth/login/login-approval.component.html @@ -1,43 +1,42 @@ -