diff --git a/apps/browser/src/popup/accounts/hint.component.html b/apps/browser/src/popup/accounts/hint.component.html index d4fab78ae613..4f5f975ccf90 100644 --- a/apps/browser/src/popup/accounts/hint.component.html +++ b/apps/browser/src/popup/accounts/hint.component.html @@ -1,7 +1,7 @@
-
diff --git a/apps/browser/src/popup/accounts/hint.component.ts b/apps/browser/src/popup/accounts/hint.component.ts index e92927621b7c..f499bb283ca4 100644 --- a/apps/browser/src/popup/accounts/hint.component.ts +++ b/apps/browser/src/popup/accounts/hint.component.ts @@ -13,7 +13,6 @@ import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUti templateUrl: "hint.component.html", }) export class HintComponent extends BaseHintComponent implements OnInit { - emailSent: string; private destroy$ = new Subject(); constructor( @@ -27,7 +26,7 @@ export class HintComponent extends BaseHintComponent implements OnInit { super(router, i18nService, apiService, platformUtilsService, logService); super.onSuccessfulSubmit = async () => { - this.router.navigate([this.successRoute], { queryParams: { email: this.emailSent } }); + this.router.navigate([this.successRoute]); }; } ngOnInit() { @@ -35,7 +34,7 @@ export class HintComponent extends BaseHintComponent implements OnInit { if (params) { const queryParamsEmail = params["email"]; if (queryParamsEmail != null && queryParamsEmail.indexOf("@") > -1) { - this.emailSent = this.email = queryParamsEmail; + this.email = queryParamsEmail; } } }); diff --git a/apps/browser/src/popup/accounts/home.component.html b/apps/browser/src/popup/accounts/home.component.html index 980e9d3cdc95..46eeb92e5b32 100644 --- a/apps/browser/src/popup/accounts/home.component.html +++ b/apps/browser/src/popup/accounts/home.component.html @@ -2,40 +2,24 @@

{{ "loginOrCreateNewAccount" | i18n }}

- - - - - -
-
-
- - -
+ +
+
+
+ +
- -
-
- -
-
- + - - +
+
+ +
+

{{ "loggingInAs" | i18n }} {{ loggedEmail }}

- {{ "notYou" | i18n }} + {{ "notYou" | i18n }}

diff --git a/apps/browser/src/popup/accounts/login.component.ts b/apps/browser/src/popup/accounts/login.component.ts index f3e1e5b970b5..1f16bd32db6d 100644 --- a/apps/browser/src/popup/accounts/login.component.ts +++ b/apps/browser/src/popup/accounts/login.component.ts @@ -109,14 +109,4 @@ export class LoginComponent extends BaseLoginComponent { codeChallenge ); } - - async goBackToHome() { - await this.stateService.setRememberedEmail(null); - this.router.navigate(["home"], { - queryParams: { - email: this.formGroup.value.email, - rememberEmail: this.formGroup.value.rememberEmail, - }, - }); - } } diff --git a/apps/browser/src/popup/app-routing.module.ts b/apps/browser/src/popup/app-routing.module.ts index a041e870894d..d20a914249b2 100644 --- a/apps/browser/src/popup/app-routing.module.ts +++ b/apps/browser/src/popup/app-routing.module.ts @@ -23,7 +23,6 @@ import { SendAddEditComponent } from "./send/send-add-edit.component"; import { SendGroupingsComponent } from "./send/send-groupings.component"; import { SendTypeComponent } from "./send/send-type.component"; import { DebounceNavigationService } from "./services/debounceNavigationService"; -import { HomeGuard } from "./services/home.guard"; import { ExcludedDomainsComponent } from "./settings/excluded-domains.component"; import { ExportComponent } from "./settings/export.component"; import { FolderAddEditComponent } from "./settings/folder-add-edit.component"; @@ -57,7 +56,7 @@ const routes: Routes = [ { path: "home", component: HomeComponent, - canActivate: [UnauthGuard, HomeGuard], + canActivate: [UnauthGuard], data: { state: "home" }, }, { diff --git a/apps/browser/src/popup/services/home.guard.ts b/apps/browser/src/popup/services/home.guard.ts deleted file mode 100644 index 2344907aa84e..000000000000 --- a/apps/browser/src/popup/services/home.guard.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Injectable } from "@angular/core"; -import { Router } from "@angular/router"; - -import { StateService } from "@bitwarden/common/abstractions/state.service"; - -@Injectable() -export class HomeGuard { - constructor(private stateService: StateService, private router: Router) {} - - async canActivate() { - const rememberedEmail = await this.stateService.getRememberedEmail(); - - if (rememberedEmail == null) { - return true; - } - - return this.router.createUrlTree(["login"]); - } -} diff --git a/apps/browser/src/popup/services/services.module.ts b/apps/browser/src/popup/services/services.module.ts index 501c51f126f1..da96f7f90379 100644 --- a/apps/browser/src/popup/services/services.module.ts +++ b/apps/browser/src/popup/services/services.module.ts @@ -61,7 +61,6 @@ import BrowserMessagingPrivateModePopupService from "../../services/browserMessa import { VaultFilterService } from "../../services/vaultFilter.service"; import { DebounceNavigationService } from "./debounceNavigationService"; -import { HomeGuard } from "./home.guard"; import { InitService } from "./init.service"; import { LockGuardService } from "./lock-guard.service"; import { PasswordRepromptService } from "./password-reprompt.service"; @@ -324,7 +323,6 @@ function getBgService(service: keyof MainBackground) { ); }, }, - HomeGuard, ], }) export class ServicesModule {}