1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-22 16:29:09 +01:00

PM-10076 - Registration start - hide env selector when on web and self hosted like other env selectors. (#10255)

This commit is contained in:
Jared Snider 2024-07-25 10:44:43 -04:00 committed by GitHub
parent 9355a9bb43
commit e3a8bb1468
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,4 @@
<form [formGroup]="formGroup">
<form [formGroup]="formGroup" *ngIf="!hideEnvSelector">
<bit-form-field>
<bit-label>{{ "creatingAccountOn" | i18n }}</bit-label>
<bit-select formControlName="selectedRegion">

View File

@ -44,6 +44,7 @@ export class RegistrationEnvSelectorComponent implements OnInit, OnDestroy {
private selectedRegionFromEnv: RegionConfig | Region.SelfHosted;
hideEnvSelector = false;
isDesktopOrBrowserExtension = false;
private destroy$ = new Subject<void>();
@ -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();
}