From 4561fbfa6b382798cf0de77ad28d4db662167ac0 Mon Sep 17 00:00:00 2001 From: Jared Snider Date: Thu, 8 Jun 2023 20:20:23 -0400 Subject: [PATCH] PM-1049 - LoginDecryptionOptions - (1) Wire up loading logic (2) Retrieve User Acct Decryption options to determine whether or not to show request admin approval btn and approve w/ MP (3) Write up future logic for requestAdminApproval (4) approveWithMasterPassword takes you to the lock screen to login. --- .../login-decryption-options.component.ts | 11 +++- .../login-decryption-options.component.ts | 11 +++- .../login-decryption-options.component.html | 13 ++++ .../login-decryption-options.component.ts | 11 +++- ...base-login-decryption-options.component.ts | 60 ++++++++++++------- 5 files changed, 80 insertions(+), 26 deletions(-) diff --git a/apps/browser/src/auth/popup/login-decryption-options/login-decryption-options.component.ts b/apps/browser/src/auth/popup/login-decryption-options/login-decryption-options.component.ts index 16d5f72887..9fa1e32f50 100644 --- a/apps/browser/src/auth/popup/login-decryption-options/login-decryption-options.component.ts +++ b/apps/browser/src/auth/popup/login-decryption-options/login-decryption-options.component.ts @@ -1,15 +1,22 @@ import { Component } from "@angular/core"; import { FormBuilder } from "@angular/forms"; +import { Router } from "@angular/router"; import { BaseLoginDecryptionOptionsComponent } from "@bitwarden/angular/auth/components/base-login-decryption-options.component"; import { DevicesApiServiceAbstraction } from "@bitwarden/common/abstractions/devices/devices-api.service.abstraction"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Component({ selector: "browser-login-decryption-options", templateUrl: "login-decryption-options.component.html", }) export class LoginDecryptionOptionsComponent extends BaseLoginDecryptionOptionsComponent { - constructor(formBuilder: FormBuilder, devicesApiService: DevicesApiServiceAbstraction) { - super(formBuilder, devicesApiService); + constructor( + formBuilder: FormBuilder, + devicesApiService: DevicesApiServiceAbstraction, + stateService: StateService, + router: Router + ) { + super(formBuilder, devicesApiService, stateService, router); } } diff --git a/apps/desktop/src/auth/login/login-decryption-options/login-decryption-options.component.ts b/apps/desktop/src/auth/login/login-decryption-options/login-decryption-options.component.ts index ba8e7e8617..7cfa12f1e6 100644 --- a/apps/desktop/src/auth/login/login-decryption-options/login-decryption-options.component.ts +++ b/apps/desktop/src/auth/login/login-decryption-options/login-decryption-options.component.ts @@ -1,15 +1,22 @@ import { Component } from "@angular/core"; import { FormBuilder } from "@angular/forms"; +import { Router } from "@angular/router"; import { BaseLoginDecryptionOptionsComponent } from "@bitwarden/angular/auth/components/base-login-decryption-options.component"; import { DevicesApiServiceAbstraction } from "@bitwarden/common/abstractions/devices/devices-api.service.abstraction"; +import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; @Component({ selector: "desktop-login-decryption-options", templateUrl: "login-decryption-options.component.html", }) export class LoginDecryptionOptionsComponent extends BaseLoginDecryptionOptionsComponent { - constructor(formBuilder: FormBuilder, devicesApiService: DevicesApiServiceAbstraction) { - super(formBuilder, devicesApiService); + constructor( + formBuilder: FormBuilder, + devicesApiService: DevicesApiServiceAbstraction, + stateService: StateService, + router: Router + ) { + super(formBuilder, devicesApiService, stateService, router); } } diff --git a/apps/web/src/app/auth/login/login-decryption-options/login-decryption-options.component.html b/apps/web/src/app/auth/login/login-decryption-options/login-decryption-options.component.html index 1947643e64..df690da70d 100644 --- a/apps/web/src/app/auth/login/login-decryption-options/login-decryption-options.component.html +++ b/apps/web/src/app/auth/login/login-decryption-options/login-decryption-options.component.html @@ -1,3 +1,12 @@ + + + {{ "loading" | i18n }} + +