diff --git a/apps/web/src/app/components/environment-selector/environment-selector.component.html b/apps/web/src/app/components/environment-selector/environment-selector.component.html index 2984d6a6a3b..5a5bada82df 100644 --- a/apps/web/src/app/components/environment-selector/environment-selector.component.html +++ b/apps/web/src/app/components/environment-selector/environment-selector.component.html @@ -2,7 +2,9 @@ diff --git a/apps/web/src/app/components/environment-selector/environment-selector.component.ts b/apps/web/src/app/components/environment-selector/environment-selector.component.ts index f9c06bbdd3d..2530a7b3642 100644 --- a/apps/web/src/app/components/environment-selector/environment-selector.component.ts +++ b/apps/web/src/app/components/environment-selector/environment-selector.component.ts @@ -1,4 +1,5 @@ import { Component, Input, OnInit } from "@angular/core"; +import { Router } from "@angular/router"; import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction"; @@ -13,14 +14,17 @@ import { Utils } from "@bitwarden/common/platform/misc/utils"; export class EnvironmentSelectorComponent implements OnInit { constructor( private configService: ConfigServiceAbstraction, - private platformUtilsService: PlatformUtilsService + private platformUtilsService: PlatformUtilsService, + private router: Router ) {} + @Input() hasFlags: boolean; isEuServer: boolean; isUsServer: boolean; showRegionSelector = false; euServerFlagEnabled: boolean; selectedRegionImageName: string; + routeAndParams: string; async ngOnInit() { this.euServerFlagEnabled = await this.configService.getFeatureFlagBool( @@ -31,6 +35,7 @@ export class EnvironmentSelectorComponent implements OnInit { this.isUsServer = domain.includes(RegionDomain.US) || domain.includes(RegionDomain.USQA); this.selectedRegionImageName = this.getRegionImage(); this.showRegionSelector = !this.platformUtilsService.isSelfHost(); + this.routeAndParams = `/#${this.router.url}`; } getRegionImage(): string {