diff --git a/backend/src/models.rs b/backend/src/models.rs index a451a9b..079f314 100644 --- a/backend/src/models.rs +++ b/backend/src/models.rs @@ -28,6 +28,7 @@ pub struct Plan { pub id: String, pub name: String, pub amount: i64, + pub hidden: bool, pub members: Option, pub blossom: bool, pub livekit: bool, diff --git a/backend/src/query.rs b/backend/src/query.rs index 7e73474..a5b32fb 100644 --- a/backend/src/query.rs +++ b/backend/src/query.rs @@ -23,6 +23,7 @@ pub fn list_plans() -> Vec { id: "free".to_string(), name: "Free".to_string(), amount: 0, + hidden: false, members: Some(10), blossom: false, livekit: false, @@ -31,6 +32,7 @@ pub fn list_plans() -> Vec { id: "basic".to_string(), name: "Basic".to_string(), amount: 500, + hidden: false, members: Some(100), blossom: true, livekit: true, @@ -39,6 +41,7 @@ pub fn list_plans() -> Vec { id: "growth".to_string(), name: "Growth".to_string(), amount: 2500, + hidden: false, members: None, blossom: true, livekit: true, diff --git a/frontend/src/components/PricingTable.tsx b/frontend/src/components/PricingTable.tsx index a3ebacf..dcba005 100644 --- a/frontend/src/components/PricingTable.tsx +++ b/frontend/src/components/PricingTable.tsx @@ -38,9 +38,24 @@ type PricingTableProps = { } export default function PricingTable(props: PricingTableProps) { + // Hidden plans (e.g. the legacy "basic" tier) stay resolvable for billing via + // the backend but never show up in the public pricing table or plan selector. + // This is the only place the hidden flag is honored. + const visiblePlans = () => plans().filter((plan) => !plan.hidden) + + // The full pricing page also shows the synthetic "Custom" card, so the column + // count tracks the real number of cards (literal classes so Tailwind keeps them). + const cardCount = () => visiblePlans().length + (props.selectable ? 0 : 1) + const gridCols: Record = { + 1: "lg:grid-cols-1", + 2: "lg:grid-cols-2", + 3: "lg:grid-cols-3", + 4: "lg:grid-cols-4", + } + return ( -
- +
+ {(plan) => { const isPopular = plan.id === "basic" const isSelected = () => props.selectable && props.selectedPlanId === plan.id @@ -99,6 +114,27 @@ export default function PricingTable(props: PricingTableProps) { ) }} + {!props.selectable && ( +
+

Custom

+
+ Let's talk +
+
    +
  • White-labeled app
  • +
  • Dedicated support
  • +
  • Custom feature development
  • +
+ + Contact us + +
+ )}
) } diff --git a/frontend/src/components/RelayForm.tsx b/frontend/src/components/RelayForm.tsx index a9804fe..ac38865 100644 --- a/frontend/src/components/RelayForm.tsx +++ b/frontend/src/components/RelayForm.tsx @@ -113,7 +113,7 @@ export default function RelayForm(props: RelayFormProps) {
- + !p.hidden)}> {(p) => (