From e3a8bb1468ba2d1f8e220af6504812923f6ddc37 Mon Sep 17 00:00:00 2001 From: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com> Date: Thu, 25 Jul 2024 10:44:43 -0400 Subject: [PATCH] PM-10076 - Registration start - hide env selector when on web and self hosted like other env selectors. (#10255) --- .../registration-env-selector.component.html | 2 +- .../registration-env-selector.component.ts | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libs/auth/src/angular/registration/registration-env-selector/registration-env-selector.component.html b/libs/auth/src/angular/registration/registration-env-selector/registration-env-selector.component.html index 9785bf05ab..5135fb6192 100644 --- a/libs/auth/src/angular/registration/registration-env-selector/registration-env-selector.component.html +++ b/libs/auth/src/angular/registration/registration-env-selector/registration-env-selector.component.html @@ -1,4 +1,4 @@ -
+ {{ "creatingAccountOn" | i18n }} diff --git a/libs/auth/src/angular/registration/registration-env-selector/registration-env-selector.component.ts b/libs/auth/src/angular/registration/registration-env-selector/registration-env-selector.component.ts index 268fb1cc99..d5e588cdd9 100644 --- a/libs/auth/src/angular/registration/registration-env-selector/registration-env-selector.component.ts +++ b/libs/auth/src/angular/registration/registration-env-selector/registration-env-selector.component.ts @@ -44,6 +44,7 @@ export class RegistrationEnvSelectorComponent implements OnInit, OnDestroy { private selectedRegionFromEnv: RegionConfig | Region.SelfHosted; + hideEnvSelector = false; isDesktopOrBrowserExtension = false; private destroy$ = new Subject(); @@ -59,9 +60,15 @@ export class RegistrationEnvSelectorComponent implements OnInit, OnDestroy { const clientType = platformUtilsService.getClientType(); this.isDesktopOrBrowserExtension = clientType === ClientType.Desktop || clientType === ClientType.Browser; + + this.hideEnvSelector = clientType === ClientType.Web && this.platformUtilsService.isSelfHost(); } async ngOnInit() { + if (this.hideEnvSelector) { + return; + } + await this.initSelectedRegionAndListenForEnvChanges(); this.listenForSelectedRegionChanges(); }