Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions apps/web/src/app/billing/shared/sm-subscribe.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { Component, Input, OnDestroy, OnInit } from "@angular/core";
import { toSignal } from "@angular/core/rxjs-interop";
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
import { Subject, startWith, takeUntil } from "rxjs";

Expand All @@ -9,6 +10,8 @@ import { SecretsManagerAlt } from "@bitwarden/assets/svg";
import { ProductTierType } from "@bitwarden/common/billing/enums";
import { BillingCustomerDiscount } from "@bitwarden/common/billing/models/response/organization-subscription.response";
import { PlanResponse } from "@bitwarden/common/billing/models/response/plan.response";
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";

export interface SecretsManagerSubscription {
Expand Down Expand Up @@ -58,7 +61,15 @@ export class SecretsManagerSubscribeComponent implements OnInit, OnDestroy {

private destroy$ = new Subject<void>();

constructor(private i18nService: I18nService) {}
protected readonly vfo1Enabled = toSignal(
this.configService.getFeatureFlag$(FeatureFlag.VFO1Foundation),
{ initialValue: false },
);

constructor(
private i18nService: I18nService,
private configService: ConfigService,
) {}

ngOnInit() {
this.formGroup.controls.enabled.valueChanges
Expand Down Expand Up @@ -95,7 +106,9 @@ export class SecretsManagerSubscribeComponent implements OnInit, OnDestroy {
get planName() {
switch (this.product) {
case ProductTierType.Free:
return this.i18nService.t("free2PersonOrganization");
return this.vfo1Enabled()
? this.i18nService.t("freePlanWithSharedVault")
: this.i18nService.t("free2PersonOrganization");
case ProductTierType.Teams:
case ProductTierType.TeamsStarter:
return this.i18nService.t("planNameTeams");
Expand Down
3 changes: 3 additions & 0 deletions apps/web/src/locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -12389,6 +12389,9 @@
"free2PersonOrganization": {
"message": "Free 2-person Organizations"
},
"freePlanWithSharedVault": {
"message": "Free plan with shared vault"
},
"unlimitedSecrets": {
"message": "Unlimited secrets"
},
Expand Down
Loading