1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-25 12:15:18 +01:00

Remove EU environment feature flag from clients (#6619)

This commit is contained in:
Todd Martin 2023-11-20 11:55:35 -05:00 committed by GitHub
parent 6f9c6d07af
commit a4b961aa0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2 additions and 20 deletions

View File

@ -20,7 +20,6 @@
isEuServer ? 'javascript:void(0)' : 'https://vault.bitwarden.eu' + routeAndParams isEuServer ? 'javascript:void(0)' : 'https://vault.bitwarden.eu' + routeAndParams
" "
class="pr-4" class="pr-4"
*ngIf="euServerFlagEnabled"
> >
<i <i
class="bwi bwi-fw bwi-sm bwi-check pb-1" class="bwi bwi-fw bwi-sm bwi-check pb-1"

View File

@ -1,8 +1,6 @@
import { Component, OnInit } from "@angular/core"; import { Component, OnInit } from "@angular/core";
import { Router } from "@angular/router"; 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";
import { RegionDomain } from "@bitwarden/common/platform/abstractions/environment.service"; import { RegionDomain } from "@bitwarden/common/platform/abstractions/environment.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { Utils } from "@bitwarden/common/platform/misc/utils"; import { Utils } from "@bitwarden/common/platform/misc/utils";
@ -12,22 +10,14 @@ import { Utils } from "@bitwarden/common/platform/misc/utils";
templateUrl: "environment-selector.component.html", templateUrl: "environment-selector.component.html",
}) })
export class EnvironmentSelectorComponent implements OnInit { export class EnvironmentSelectorComponent implements OnInit {
constructor( constructor(private platformUtilsService: PlatformUtilsService, private router: Router) {}
private configService: ConfigServiceAbstraction,
private platformUtilsService: PlatformUtilsService,
private router: Router
) {}
isEuServer: boolean; isEuServer: boolean;
isUsServer: boolean; isUsServer: boolean;
showRegionSelector = false; showRegionSelector = false;
euServerFlagEnabled: boolean;
routeAndParams: string; routeAndParams: string;
async ngOnInit() { async ngOnInit() {
this.euServerFlagEnabled = await this.configService.getFeatureFlag<boolean>(
FeatureFlag.DisplayEuEnvironmentFlag
);
const domain = Utils.getDomain(window.location.href); const domain = Utils.getDomain(window.location.href);
this.isEuServer = domain.includes(RegionDomain.EU); this.isEuServer = domain.includes(RegionDomain.EU);
this.isUsServer = domain.includes(RegionDomain.US) || domain.includes(RegionDomain.USQA); this.isUsServer = domain.includes(RegionDomain.US) || domain.includes(RegionDomain.USQA);

View File

@ -63,7 +63,6 @@
class="environment-selector-dialog-item" class="environment-selector-dialog-item"
(click)="toggle(ServerEnvironmentType.EU)" (click)="toggle(ServerEnvironmentType.EU)"
[attr.aria-pressed]="selectedEnvironment === ServerEnvironmentType.EU ? 'true' : 'false'" [attr.aria-pressed]="selectedEnvironment === ServerEnvironmentType.EU ? 'true' : 'false'"
*ngIf="euServerFlagEnabled"
> >
<i <i
class="bwi bwi-fw bwi-sm bwi-check" class="bwi bwi-fw bwi-sm bwi-check"
@ -75,7 +74,7 @@
></i> ></i>
<span>{{ "euDomain" | i18n }}</span> <span>{{ "euDomain" | i18n }}</span>
</button> </button>
<br *ngIf="euServerFlagEnabled" /> <br />
<button <button
type="button" type="button"
class="environment-selector-dialog-item" class="environment-selector-dialog-item"

View File

@ -4,7 +4,6 @@ import { Component, EventEmitter, OnDestroy, OnInit, Output } from "@angular/cor
import { Router } from "@angular/router"; import { Router } from "@angular/router";
import { Subject, takeUntil } from "rxjs"; import { Subject, takeUntil } from "rxjs";
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction"; import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction";
import { import {
EnvironmentService as EnvironmentServiceAbstraction, EnvironmentService as EnvironmentServiceAbstraction,
@ -37,7 +36,6 @@ import {
}) })
export class EnvironmentSelectorComponent implements OnInit, OnDestroy { export class EnvironmentSelectorComponent implements OnInit, OnDestroy {
@Output() onOpenSelfHostedSettings = new EventEmitter(); @Output() onOpenSelfHostedSettings = new EventEmitter();
euServerFlagEnabled: boolean;
isOpen = false; isOpen = false;
showingModal = false; showingModal = false;
selectedEnvironment: Region; selectedEnvironment: Region;
@ -89,9 +87,6 @@ export class EnvironmentSelectorComponent implements OnInit, OnDestroy {
async updateEnvironmentInfo() { async updateEnvironmentInfo() {
this.selectedEnvironment = this.environmentService.selectedRegion; this.selectedEnvironment = this.environmentService.selectedRegion;
this.euServerFlagEnabled = await this.configService.getFeatureFlag<boolean>(
FeatureFlag.DisplayEuEnvironmentFlag
);
} }
close() { close() {

View File

@ -1,5 +1,4 @@
export enum FeatureFlag { export enum FeatureFlag {
DisplayEuEnvironmentFlag = "display-eu-environment",
DisplayLowKdfIterationWarningFlag = "display-kdf-iteration-warning", DisplayLowKdfIterationWarningFlag = "display-kdf-iteration-warning",
Fido2VaultCredentials = "fido2-vault-credentials", Fido2VaultCredentials = "fido2-vault-credentials",
TrustedDeviceEncryption = "trusted-device-encryption", TrustedDeviceEncryption = "trusted-device-encryption",