From 3008b5392111bb35e968f93582f8d427f752a713 Mon Sep 17 00:00:00 2001 From: Alex Dragovich Date: Thu, 13 Aug 2026 13:32:51 -0700 Subject: [PATCH 1/2] [PM-40396] tools export routing change from tools to settings --- .../app/layouts/user-layout.component.html | 2 +- apps/web/src/app/oss-routing.module.ts | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/apps/web/src/app/layouts/user-layout.component.html b/apps/web/src/app/layouts/user-layout.component.html index a6b971aa0016..02bd4bdb99ea 100644 --- a/apps/web/src/app/layouts/user-layout.component.html +++ b/apps/web/src/app/layouts/user-layout.component.html @@ -28,7 +28,7 @@ [spotlight]="true" > - + + import("./tools/vault-export/export-web.component").then( + (mod) => mod.ExportWebComponent, + ), + data: { + titleId: "exportNoun", + } satisfies RouteDataProperties, + }, ], }, { @@ -790,13 +800,8 @@ const routes: Routes = [ }, { path: "export", - loadComponent: () => - import("./tools/vault-export/export-web.component").then( - (mod) => mod.ExportWebComponent, - ), - data: { - titleId: "exportNoun", - } satisfies RouteDataProperties, + redirectTo: "/settings/export", + pathMatch: "full", }, { path: "generator", From dfac09939368560717ff98e404993cf34466a4c4 Mon Sep 17 00:00:00 2001 From: Alex Dragovich Date: Thu, 13 Aug 2026 17:18:05 -0700 Subject: [PATCH 2/2] [PM-40396] adding vfo1 ff --- .../app/layouts/user-layout.component.html | 2 +- .../src/app/layouts/user-layout.component.ts | 12 ++++++++++ apps/web/src/app/oss-routing.module.ts | 24 +++++++++++++++---- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/apps/web/src/app/layouts/user-layout.component.html b/apps/web/src/app/layouts/user-layout.component.html index 02bd4bdb99ea..108a0e8373c4 100644 --- a/apps/web/src/app/layouts/user-layout.component.html +++ b/apps/web/src/app/layouts/user-layout.component.html @@ -28,7 +28,7 @@ [spotlight]="true" > - + { + const vfo1Enabled = this.vfo1Enabled(); + return vfo1Enabled ? "/settings/export" : "/tools/export"; + }); + + protected readonly vfo1Enabled = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.VFO1Foundation), + ); protected readonly importCoachmarkOpen = computed( () => this.coachmarkService.activeStepId() === "importData", diff --git a/apps/web/src/app/oss-routing.module.ts b/apps/web/src/app/oss-routing.module.ts index 3843668569f3..25271fcf13ce 100644 --- a/apps/web/src/app/oss-routing.module.ts +++ b/apps/web/src/app/oss-routing.module.ts @@ -1,5 +1,5 @@ -import { NgModule } from "@angular/core"; -import { Route, RouterModule, Routes } from "@angular/router"; +import { NgModule, inject } from "@angular/core"; +import { Route, Router, RouterModule, Routes } from "@angular/router"; import { map, switchMap } from "rxjs"; import { organizationPolicyGuard } from "@bitwarden/angular/admin-console/guards"; @@ -53,6 +53,7 @@ import { import { canAccessEmergencyAccess } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { AnonLayoutWrapperComponent, AnonLayoutWrapperData } from "@bitwarden/components"; import { LockComponent, RemovePasswordComponent } from "@bitwarden/key-management-ui"; import { premiumInterestRedirectGuard } from "@bitwarden/web-vault/app/vault/guards/premium-interest-redirect/premium-interest-redirect.guard"; @@ -779,6 +780,7 @@ const routes: Routes = [ import("./tools/vault-export/export-web.component").then( (mod) => mod.ExportWebComponent, ), + canActivate: [canAccessFeature(FeatureFlag.VFO1Foundation)], data: { titleId: "exportNoun", } satisfies RouteDataProperties, @@ -800,8 +802,14 @@ const routes: Routes = [ }, { path: "export", - redirectTo: "/settings/export", - pathMatch: "full", + loadComponent: () => + import("./tools/vault-export/export-web.component").then( + (mod) => mod.ExportWebComponent, + ), + canActivate: [vfo1ConditionalRedirect], + data: { + titleId: "exportNoun", + } satisfies RouteDataProperties, }, { path: "generator", @@ -824,6 +832,14 @@ const routes: Routes = [ }, ]; +function vfo1ConditionalRedirect() { + const configService = inject(ConfigService); + const router = inject(Router); + return configService + .getFeatureFlag$(FeatureFlag.VFO1Foundation) + .pipe(map((isEnabled) => (isEnabled ? router.parseUrl("/settings/export") : true))); +} + @NgModule({ imports: [ RouterModule.forRoot(routes, {