Skip to content
This repository was archived by the owner on Jan 31, 2025. It is now read-only.

Commit 579608f

Browse files
committed
refactor: change billing plans (#447)
Closes FRONT-570
1 parent 3e32bef commit 579608f

File tree

4 files changed

+77
-31
lines changed

4 files changed

+77
-31
lines changed

apps/hub/src/components/intro.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export function Intro({ initialStep, initialProjectName }: IntroProps) {
180180
}}
181181
config={{
182182
[RivetEe.ee.billing.Plan.Trial]: {
183-
cancelLabel: "Continue",
183+
cancelLabel: "Get Started",
184184
onCancel: () => {
185185
navigate({
186186
to: "/projects/$projectNameId/environments/$environmentNameId",

apps/hub/src/domains/project/components/billing/billing-plan-card.tsx

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
Flex,
88
SmallText,
99
Text,
10+
cn,
1011
} from "@rivet-gg/components";
1112
import { Icon, type IconProp } from "@rivet-gg/icons";
1213
import type { ReactNode } from "@tanstack/react-router";
@@ -16,7 +17,12 @@ export interface BillingPlanCardProps {
1617
lead?: string;
1718
price: string;
1819
priceLead?: string;
19-
features: { key?: string; name: ReactNode; icon?: IconProp }[];
20+
features: {
21+
key?: string;
22+
name: ReactNode;
23+
icon?: IconProp;
24+
bold?: boolean;
25+
}[];
2026
type?: "custom" | "active";
2127
onSubscribe?: () => void;
2228
onCancel?: () => void;
@@ -37,13 +43,13 @@ export function BillingPlanCard({
3743
return (
3844
<Card className="flex flex-col group hover:border-primary transition-colors">
3945
<CardHeader>
40-
<Text className="font-bold text-3xl">{title}</Text>
46+
<Text className="font-semibold text-2xl">{title}</Text>
4147
{lead ? <SmallText>{lead}</SmallText> : null}
4248
<div className="pt-8 min-h-[7rem]">
4349
<p>
4450
<span className="text-5xl font-bold mr-1 ">{price}</span>
4551
<span className="text-muted-foreground">
46-
{type !== "custom" ? "/month" : null}
52+
{type !== "custom" ? "/mo" : null}
4753
</span>
4854
</p>
4955
{priceLead ? (
@@ -52,13 +58,18 @@ export function BillingPlanCard({
5258
</div>
5359
</CardHeader>
5460
<CardContent className="flex-1">
55-
<Flex direction="col" gap="2" asChild>
61+
<Flex direction="col" gap="4" asChild>
5662
<ul>
57-
{features.map(({ key, name, icon }) => (
63+
{features.map(({ key, name, bold, icon }) => (
5864
<Flex items="center" gap="2" key={key || name} asChild>
59-
<li>
65+
<li
66+
className={cn(
67+
bold && "font-semibold",
68+
bold ? "text-foreground" : "text-muted-foreground",
69+
)}
70+
>
6071
{icon ? <Icon icon={icon} className="size-5 " /> : null}
61-
<span className="text-muted-foreground">{name}</span>
72+
<span>{name}</span>
6273
</li>
6374
</Flex>
6475
))}
@@ -80,7 +91,7 @@ export function BillingPlanCard({
8091
{cancelLabel || "Cancel"}
8192
</Button>
8293
) : null}
83-
{!type ? <Button onClick={onSubscribe}>Subscribe</Button> : null}
94+
{!type ? <Button onClick={onSubscribe}>Upgrade</Button> : null}
8495
</CardFooter>
8596
</Card>
8697
);

apps/hub/src/domains/project/components/billing/billing-plans.tsx

Lines changed: 56 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ import { Rivet as RivetEe } from "@rivet-gg/api-ee";
33
import { Flex, Grid, H2, Link } from "@rivet-gg/components";
44
import {
55
faBadgeCheck,
6-
faChartMixed,
6+
faCheckCircle,
7+
faClock,
78
faComments,
8-
faComputerClassic,
9+
faDatabase,
910
faEnvelope,
1011
faGift,
12+
faGlobe,
1113
faHeadset,
1214
faInfinity,
1315
faLockA,
16+
faRocketLaunch,
1417
faServer,
15-
faShareFromSquare,
16-
faShield,
1718
} from "@rivet-gg/icons";
1819
import { PRICE_MAP } from "../../data/billing-calculate-usage";
1920
import { useBilling } from "./billing-context";
@@ -67,11 +68,17 @@ export function BillingPlans({
6768
type={plan === RivetEe.ee.billing.Plan.Trial ? "active" : undefined}
6869
features={[
6970
{
70-
name: "50,000 Free Actors",
71+
name: (
72+
<span>
73+
50,000 Free Actors
74+
<span className="text-xs text-muted-foreground font-normal ml-0.5">
75+
/mo
76+
</span>
77+
</span>
78+
),
79+
bold: true,
7180
icon: faGift,
7281
},
73-
{ name: "DDoS Mitigation", icon: faShield },
74-
{ name: "Automatic SSL", icon: faLockA },
7582
{ name: "Community Support", icon: faComments },
7683
]}
7784
{...config?.[RivetEe.ee.billing.Plan.Trial]}
@@ -93,12 +100,20 @@ export function BillingPlans({
93100
priceLead="+ Actor Usage"
94101
features={[
95102
{
96-
name: "200,000 Free Actors",
103+
name: (
104+
<span>
105+
200,000 Free Actors
106+
<span className="text-xs text-muted-foreground font-normal ml-0.5">
107+
/mo
108+
</span>
109+
</span>
110+
),
111+
bold: true,
97112
icon: faGift,
98113
},
99-
{ name: "Analytics", icon: faChartMixed },
114+
{ name: "Everything in Community", icon: faCheckCircle },
115+
{ name: "No Usage Limits", icon: faInfinity },
100116
{ name: "Email Support", icon: faEnvelope },
101-
{ name: "Share Features", icon: faShareFromSquare },
102117
]}
103118
{...config?.[RivetEe.ee.billing.Plan.Indie]}
104119
/>
@@ -119,38 +134,58 @@ export function BillingPlans({
119134
priceLead="+ Actor Usage"
120135
features={[
121136
{
122-
name: "AWS + G Cloud + Azure",
123-
icon: faServer,
137+
name: (
138+
<span>
139+
200,000 Free Actors
140+
<span className="text-xs text-muted-foreground font-normal ml-0.5">
141+
/mo
142+
</span>
143+
</span>
144+
),
145+
bold: true,
146+
icon: faGift,
124147
},
125-
{ name: "Analytics", icon: faChartMixed },
148+
{ name: "Everything in Pro", icon: faCheckCircle },
149+
{ name: "No Usage Limits", icon: faInfinity },
126150
{ name: "Advanced Support", icon: faHeadset },
127-
{ name: "Share Features", icon: faShareFromSquare },
151+
{
152+
name: "Dedicated Hardware",
153+
icon: faServer,
154+
},
155+
{ name: "Custom Regions", icon: faGlobe },
128156
]}
129157
{...config?.[RivetEe.ee.billing.Plan.Studio]}
130158
/>
131159
<BillingPlanCard
132160
title="Enterprise"
133161
price="Custom"
134162
features={[
135-
{
136-
name: "Unlimited Projects",
137-
icon: faInfinity,
138-
},
163+
{ name: "Everything in Team", icon: faCheckCircle },
139164
{
140165
name: "Priority Support",
141166
icon: faHeadset,
142167
},
143168
{
144-
name: "99.99% SLA",
169+
name: "SLA",
145170
icon: faBadgeCheck,
146171
},
172+
{ name: "No Usage Limits", icon: faInfinity },
147173
{
148174
name: "OIDC SSO Provider",
149175
icon: faLockA,
150176
},
151177
{
152-
name: "Dedicated Hardware",
153-
icon: faComputerClassic,
178+
name: "On-Perm Deployment",
179+
icon: faRocketLaunch,
180+
},
181+
{
182+
name: "Custom Storage Reads, Writes and Stored Data",
183+
icon: faDatabase,
184+
},
185+
186+
{
187+
name: "Custom Log Retention",
188+
icon: faClock,
154189
},
155190
]}
156191
type="custom"

apps/hub/src/routes/_authenticated/_layout/projects/$projectNameId/environments/$environmentNameId/builds.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function ProjectBuildLatestButton({
172172
);
173173
}
174174

175-
return <Icon icon={faCheckCircle} className="fill-primary" />;
175+
return <Icon icon={faCheckCircle} className="fill-primary text-primary" />;
176176
}
177177

178178
export const Route = createFileRoute(

0 commit comments

Comments
 (0)