mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-20 02:01:47 +01:00
PM-8113 - Deprecate TwoFactorComponentRefactor feature flag in favor of UnauthenticatedExtensionUIRefresh flag
This commit is contained in:
parent
c17f582768
commit
0959069b76
@ -38,7 +38,6 @@ import {
|
|||||||
} from "@bitwarden/auth/angular";
|
} from "@bitwarden/auth/angular";
|
||||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
||||||
|
|
||||||
import { twofactorRefactorSwap } from "../../../../libs/angular/src/utils/two-factor-component-refactor-route-swap";
|
|
||||||
import { fido2AuthGuard } from "../auth/guards/fido2-auth.guard";
|
import { fido2AuthGuard } from "../auth/guards/fido2-auth.guard";
|
||||||
import { AccountSwitcherComponent } from "../auth/popup/account-switching/account-switcher.component";
|
import { AccountSwitcherComponent } from "../auth/popup/account-switching/account-switcher.component";
|
||||||
import { EnvironmentComponent } from "../auth/popup/environment.component";
|
import { EnvironmentComponent } from "../auth/popup/environment.component";
|
||||||
@ -190,7 +189,7 @@ const routes: Routes = [
|
|||||||
canMatch: [extensionRefreshRedirect("/lockV2")],
|
canMatch: [extensionRefreshRedirect("/lockV2")],
|
||||||
data: { state: "lock", doNotSaveUrl: true } satisfies RouteDataProperties,
|
data: { state: "lock", doNotSaveUrl: true } satisfies RouteDataProperties,
|
||||||
},
|
},
|
||||||
...twofactorRefactorSwap(
|
...unauthUiRefreshSwap(
|
||||||
TwoFactorComponent,
|
TwoFactorComponent,
|
||||||
AnonLayoutWrapperComponent,
|
AnonLayoutWrapperComponent,
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,6 @@ import {
|
|||||||
} from "@bitwarden/auth/angular";
|
} from "@bitwarden/auth/angular";
|
||||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
||||||
|
|
||||||
import { twofactorRefactorSwap } from "../../../../libs/angular/src/utils/two-factor-component-refactor-route-swap";
|
|
||||||
import { AccessibilityCookieComponent } from "../auth/accessibility-cookie.component";
|
import { AccessibilityCookieComponent } from "../auth/accessibility-cookie.component";
|
||||||
import { maxAccountsGuardFn } from "../auth/guards/max-accounts.guard";
|
import { maxAccountsGuardFn } from "../auth/guards/max-accounts.guard";
|
||||||
import { HintComponent } from "../auth/hint.component";
|
import { HintComponent } from "../auth/hint.component";
|
||||||
@ -83,7 +82,7 @@ const routes: Routes = [
|
|||||||
path: "admin-approval-requested",
|
path: "admin-approval-requested",
|
||||||
component: LoginViaAuthRequestComponent,
|
component: LoginViaAuthRequestComponent,
|
||||||
},
|
},
|
||||||
...twofactorRefactorSwap(
|
...unauthUiRefreshSwap(
|
||||||
TwoFactorComponent,
|
TwoFactorComponent,
|
||||||
AnonLayoutWrapperComponent,
|
AnonLayoutWrapperComponent,
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,6 @@ import {
|
|||||||
} from "@bitwarden/auth/angular";
|
} from "@bitwarden/auth/angular";
|
||||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
||||||
|
|
||||||
import { twofactorRefactorSwap } from "../../../../libs/angular/src/utils/two-factor-component-refactor-route-swap";
|
|
||||||
import { flagEnabled, Flags } from "../utils/flags";
|
import { flagEnabled, Flags } from "../utils/flags";
|
||||||
|
|
||||||
import { VerifyRecoverDeleteOrgComponent } from "./admin-console/organizations/manage/verify-recover-delete-org.component";
|
import { VerifyRecoverDeleteOrgComponent } from "./admin-console/organizations/manage/verify-recover-delete-org.component";
|
||||||
@ -457,7 +456,7 @@ const routes: Routes = [
|
|||||||
path: "2fa",
|
path: "2fa",
|
||||||
canActivate: [unauthGuardFn()],
|
canActivate: [unauthGuardFn()],
|
||||||
children: [
|
children: [
|
||||||
...twofactorRefactorSwap(TwoFactorComponent, TwoFactorAuthComponent, {
|
...unauthUiRefreshSwap(TwoFactorComponent, TwoFactorAuthComponent, {
|
||||||
path: "",
|
path: "",
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
import { Type, inject } from "@angular/core";
|
|
||||||
import { Route, Routes } from "@angular/router";
|
|
||||||
|
|
||||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
|
||||||
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
|
||||||
|
|
||||||
import { componentRouteSwap } from "./component-route-swap";
|
|
||||||
/**
|
|
||||||
* Helper function to swap between two components based on the TwoFactorComponentRefactor feature flag.
|
|
||||||
* @param defaultComponent - The current non-refactored component to render.
|
|
||||||
* @param refreshedComponent - The new refactored component to render.
|
|
||||||
* @param defaultOptions - The options to apply to the default component and the refactored component, if alt options are not provided.
|
|
||||||
* @param altOptions - The options to apply to the refactored component.
|
|
||||||
*/
|
|
||||||
export function twofactorRefactorSwap(
|
|
||||||
defaultComponent: Type<any>,
|
|
||||||
refreshedComponent: Type<any>,
|
|
||||||
defaultOptions: Route,
|
|
||||||
altOptions?: Route,
|
|
||||||
): Routes {
|
|
||||||
return componentRouteSwap(
|
|
||||||
defaultComponent,
|
|
||||||
refreshedComponent,
|
|
||||||
async () => {
|
|
||||||
const configService = inject(ConfigService);
|
|
||||||
return configService.getFeatureFlag(FeatureFlag.TwoFactorComponentRefactor);
|
|
||||||
},
|
|
||||||
defaultOptions,
|
|
||||||
altOptions,
|
|
||||||
);
|
|
||||||
}
|
|
@ -14,7 +14,6 @@ export enum FeatureFlag {
|
|||||||
UseTreeWalkerApiForPageDetailsCollection = "use-tree-walker-api-for-page-details-collection",
|
UseTreeWalkerApiForPageDetailsCollection = "use-tree-walker-api-for-page-details-collection",
|
||||||
EmailVerification = "email-verification",
|
EmailVerification = "email-verification",
|
||||||
InlineMenuFieldQualification = "inline-menu-field-qualification",
|
InlineMenuFieldQualification = "inline-menu-field-qualification",
|
||||||
TwoFactorComponentRefactor = "two-factor-component-refactor",
|
|
||||||
InlineMenuPositioningImprovements = "inline-menu-positioning-improvements",
|
InlineMenuPositioningImprovements = "inline-menu-positioning-improvements",
|
||||||
ProviderClientVaultPrivacyBanner = "ac-2833-provider-client-vault-privacy-banner",
|
ProviderClientVaultPrivacyBanner = "ac-2833-provider-client-vault-privacy-banner",
|
||||||
VaultBulkManagementAction = "vault-bulk-management-action",
|
VaultBulkManagementAction = "vault-bulk-management-action",
|
||||||
@ -64,7 +63,6 @@ export const DefaultFeatureFlagValue = {
|
|||||||
[FeatureFlag.UseTreeWalkerApiForPageDetailsCollection]: FALSE,
|
[FeatureFlag.UseTreeWalkerApiForPageDetailsCollection]: FALSE,
|
||||||
[FeatureFlag.EmailVerification]: FALSE,
|
[FeatureFlag.EmailVerification]: FALSE,
|
||||||
[FeatureFlag.InlineMenuFieldQualification]: FALSE,
|
[FeatureFlag.InlineMenuFieldQualification]: FALSE,
|
||||||
[FeatureFlag.TwoFactorComponentRefactor]: FALSE,
|
|
||||||
[FeatureFlag.InlineMenuPositioningImprovements]: FALSE,
|
[FeatureFlag.InlineMenuPositioningImprovements]: FALSE,
|
||||||
[FeatureFlag.ProviderClientVaultPrivacyBanner]: FALSE,
|
[FeatureFlag.ProviderClientVaultPrivacyBanner]: FALSE,
|
||||||
[FeatureFlag.VaultBulkManagementAction]: FALSE,
|
[FeatureFlag.VaultBulkManagementAction]: FALSE,
|
||||||
|
Loading…
Reference in New Issue
Block a user