mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-11 10:10:25 +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:
parent
9355a9bb43
commit
e3a8bb1468
@ -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">
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user