Skip to content

Commit d195ad4

Browse files
chore(web): Update plan name 'Enterprise' to 'Pro'
1 parent 87f1b75 commit d195ad4

19 files changed

Lines changed: 75 additions & 63 deletions

packages/backend/src/ee/syncSearchContexts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const syncSearchContexts = async (params: SyncSearchContextsParams) => {
1818

1919
if (!await hasEntitlement("search-contexts")) {
2020
if (contexts) {
21-
logger.warn(`Skipping search context sync. Reason: "Search contexts are not supported in your current plan. If you have a valid enterprise license key, pass it via SOURCEBOT_EE_LICENSE_KEY. For support, contact ${SOURCEBOT_SUPPORT_EMAIL}."`);
21+
logger.warn(`Skipping search context sync. Reason: "Search contexts are not supported in your current plan. For support, contact ${SOURCEBOT_SUPPORT_EMAIL}."`);
2222
}
2323
return false;
2424
}
Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,33 @@
11
import { Badge } from "@/components/ui/badge"
2+
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"
3+
import { OFFERINGS_DOCS_LINK } from "@/lib/constants"
4+
import * as TooltipPrimitive from "@radix-ui/react-tooltip"
5+
import Link from "next/link"
26

37
export const UpgradeBadge = () => {
48
return (
5-
<Badge
6-
className="bg-purple-500/20 text-purple-400 border-purple-500/30 text-[10px] px-1.5 py-0 rounded-md leading-normal tracking-wide"
7-
>
8-
Upgrade
9-
</Badge>
9+
<Tooltip>
10+
<TooltipTrigger asChild>
11+
<Badge
12+
className="bg-purple-500/20 text-purple-400 border-purple-500/30 text-[10px] px-1.5 py-0 rounded-md leading-normal tracking-wide"
13+
>
14+
Pro
15+
</Badge>
16+
</TooltipTrigger>
17+
<TooltipPrimitive.Portal>
18+
<TooltipContent side="right" className="font-normal">
19+
This feature requires a subscription.{" "}
20+
<Link
21+
href={OFFERINGS_DOCS_LINK}
22+
target="_blank"
23+
rel="noopener noreferrer"
24+
className="hover:underline text-purple-400"
25+
onClick={(e) => e.stopPropagation()}
26+
>
27+
Learn more
28+
</Link>
29+
</TooltipContent>
30+
</TooltipPrimitive.Portal>
31+
</Tooltip>
1032
)
1133
}

packages/web/src/app/(app)/@sidebar/components/upgradeButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const UpgradeButton = () => {
2121
return null;
2222
}
2323

24-
const label = offers.trial.eligible ? "Try Enterprise" : "Upgrade to Enterprise";
24+
const label = offers.trial.eligible ? "Try Pro" : "Upgrade to Pro";
2525
return (
2626
<>
2727
<div className="group-data-[state=collapsed]:hidden px-2 pt-1">

packages/web/src/app/(app)/components/banners/invoicePastDueBanner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function InvoicePastDueBanner({ id, dismissible }: BannerProps) {
1111
dismissible={dismissible}
1212
icon={<CreditCard className="h-4 w-4 mt-0.5 text-destructive" />}
1313
title="Payment failed"
14-
description="Your last invoice hasn't been paid. Update your payment method to avoid losing enterprise access."
14+
description="Your last invoice hasn't been paid. Update your payment method to avoid being downgraded."
1515
action={
1616
<Button asChild size="sm" variant="outline">
1717
<Link href="/settings/license">Manage license</Link>

packages/web/src/app/(app)/components/banners/licenseExpiredBanner.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,30 @@ import { OrgRole } from "@sourcebot/db";
44
import { Button } from "@/components/ui/button";
55
import { BannerShell } from "./bannerShell";
66
import type { BannerProps } from "./types";
7+
import { OFFERINGS_DOCS_LINK } from "@/lib/constants";
78

89
interface LicenseExpiredBannerProps extends BannerProps {
910
source: 'offline' | 'online';
1011
}
1112

12-
// @nocheckin: This should instead be a docs page that explains the enterprise offering.
13-
const ENTERPRISE_OFFERING_DOCS_LINK = "https://sourcebot.dev/pricing";
14-
1513
export function LicenseExpiredBanner({ id, dismissible, role, source }: LicenseExpiredBannerProps) {
1614
const isOwner = role === OrgRole.OWNER;
1715

1816
const whatsAffectedLink = (
19-
<a href={ENTERPRISE_OFFERING_DOCS_LINK} target="_blank" rel="noopener noreferrer">
17+
<a href={OFFERINGS_DOCS_LINK} target="_blank" rel="noopener noreferrer">
2018
What&apos;s affected?
2119
</a>
2220
);
2321

2422
const description = (() => {
2523
if (source === 'offline') {
2624
return isOwner
27-
? <>Your license has expired and enterprise features are disabled. Update <code className="font-mono text-xs">SOURCEBOT_EE_LICENSE_KEY</code> to restore access. {whatsAffectedLink}</>
28-
: <>Your license has expired and enterprise features are disabled. Contact your organization administrator to restore access. {whatsAffectedLink}</>;
25+
? <>Your license has expired and paid features are disabled. Update <code className="font-mono text-xs">SOURCEBOT_EE_LICENSE_KEY</code> to restore access. {whatsAffectedLink}</>
26+
: <>Your license has expired and paid features are disabled. Contact your organization administrator to restore access. {whatsAffectedLink}</>;
2927
}
3028
return isOwner
31-
? <>Your subscription has ended and enterprise features are disabled. Renew to restore access. {whatsAffectedLink}</>
32-
: <>Your subscription has ended and enterprise features are disabled. Contact your organization administrator to restore access. {whatsAffectedLink}</>;
29+
? <>Your subscription has ended and paid features are disabled. Renew to restore access. {whatsAffectedLink}</>
30+
: <>Your subscription has ended and paid features are disabled. Contact your organization administrator to restore access. {whatsAffectedLink}</>;
3331
})();
3432

3533
return (

packages/web/src/app/(app)/components/banners/licenseExpiryHeadsUpBanner.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export function LicenseExpiryHeadsUpBanner({ id, dismissible, source, expiresAt,
1616
const relative = formatDistance(expiresAtDate, now, { addSuffix: true });
1717

1818
const description = source === 'offline'
19-
? <>Update <code className="font-mono text-xs">SOURCEBOT_EE_LICENSE_KEY</code> to keep enterprise access.</>
20-
: "Renew to keep enterprise access.";
19+
? <>Update <code className="font-mono text-xs">SOURCEBOT_EE_LICENSE_KEY</code> to keep paid features active.</>
20+
: "Renew to keep paid features active.";
2121

2222
return (
2323
<BannerShell

packages/web/src/app/(app)/components/banners/licenseReboundElsewhereBanner.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,20 @@ import { OrgRole } from "@sourcebot/db";
44
import { Button } from "@/components/ui/button";
55
import { BannerShell } from "./bannerShell";
66
import type { BannerProps } from "./types";
7-
8-
// @nocheckin: This should instead be a docs page that explains the enterprise offering.
9-
const ENTERPRISE_OFFERING_DOCS_LINK = "https://sourcebot.dev/pricing";
7+
import { OFFERINGS_DOCS_LINK } from "@/lib/constants";
108

119
export function LicenseReboundElsewhereBanner({ id, dismissible, role }: BannerProps) {
1210
const isOwner = role === OrgRole.OWNER;
1311

1412
const whatsAffectedLink = (
15-
<a href={ENTERPRISE_OFFERING_DOCS_LINK} target="_blank" rel="noopener noreferrer">
13+
<a href={OFFERINGS_DOCS_LINK} target="_blank" rel="noopener noreferrer">
1614
What&apos;s affected?
1715
</a>
1816
);
1917

2018
const description = isOwner
21-
? <>This license is currently activated on a different Sourcebot install, and enterprise features have been disabled here. To use it on this install, deactivate and reactivate the license. {whatsAffectedLink}</>
22-
: <>This license is currently activated on a different Sourcebot install, and enterprise features have been disabled. Contact your organization administrator to restore access. {whatsAffectedLink}</>;
19+
? <>This license is currently activated on a different Sourcebot install, and paid features have been disabled here. To use it on this install, deactivate and reactivate the license. {whatsAffectedLink}</>
20+
: <>This license is currently activated on a different Sourcebot install, and paid features have been disabled. Contact your organization administrator to restore access. {whatsAffectedLink}</>;
2321

2422
return (
2523
<BannerShell

packages/web/src/app/(app)/components/banners/servicePingFailedBanner.tsx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Button } from "@/components/ui/button";
55
import { BannerShell } from "./bannerShell";
66
import { RefreshLicenseButton } from "./refreshLicenseButton";
77
import type { BannerProps } from "./types";
8+
import { OFFERINGS_DOCS_LINK } from "@/lib/constants";
89

910
interface ServicePingFailedBannerProps extends BannerProps {
1011
variant: 'warning' | 'enforced';
@@ -13,10 +14,7 @@ interface ServicePingFailedBannerProps extends BannerProps {
1314
}
1415

1516
// @nocheckin: link to the service ping docs here when ready.
16-
const DOCS_LINK = "https://docs.sourcebot.dev/docs";
17-
18-
// @nocheckin: This should instead be a docs page that explains the enterprise offering.
19-
const ENTERPRISE_OFFERING_DOCS_LINK = "https://sourcebot.dev/pricing";
17+
const SERVICE_PING_DOCS_LINK = "https://docs.sourcebot.dev/docs";
2018

2119
export function ServicePingFailedBanner({
2220
id,
@@ -32,7 +30,7 @@ export function ServicePingFailedBanner({
3230
: null;
3331

3432
const whatsAffectedLink = (
35-
<a href={ENTERPRISE_OFFERING_DOCS_LINK} target="_blank" rel="noopener noreferrer">
33+
<a href={OFFERINGS_DOCS_LINK} target="_blank" rel="noopener noreferrer">
3634
What&apos;s affected?
3735
</a>
3836
);
@@ -46,14 +44,14 @@ export function ServicePingFailedBanner({
4644
title="Can't verify license"
4745
description={
4846
relative
49-
? `Last successful sync with the Sourcebot license server was ${relative}. Enterprise features will be disabled if this persists.`
50-
: "Enterprise features will be disabled if this persists."
47+
? `Last successful sync with the Sourcebot license server was ${relative}. Paid features will be disabled if this persists.`
48+
: "Paid features will be disabled if this persists."
5149
}
5250
action={
5351
<>
5452
<RefreshLicenseButton />
5553
<Button asChild size="sm" variant="outline">
56-
<a href={DOCS_LINK} target="_blank" rel="noopener noreferrer">
54+
<a href={SERVICE_PING_DOCS_LINK} target="_blank" rel="noopener noreferrer">
5755
Learn more
5856
</a>
5957
</Button>
@@ -65,12 +63,12 @@ export function ServicePingFailedBanner({
6563

6664
const description = (() => {
6765
if (!isOwner) {
68-
return <>Sourcebot can&apos;t verify this license right now. Enterprise features have been disabled. Contact your organization administrator to restore access. {whatsAffectedLink}</>;
66+
return <>Sourcebot can&apos;t verify this license right now. Paid features have been disabled. Contact your organization administrator to restore access. {whatsAffectedLink}</>;
6967
}
7068
if (relative) {
71-
return <>Last successful sync with the Sourcebot license server was {relative}. Enterprise features have been disabled. {whatsAffectedLink}</>;
69+
return <>Last successful sync with the Sourcebot license server was {relative}. Paid features have been disabled. {whatsAffectedLink}</>;
7270
}
73-
return <>Sourcebot has not been able to verify this license and enterprise features are disabled. {whatsAffectedLink}</>;
71+
return <>Sourcebot has not been able to verify this license and paid features are disabled. {whatsAffectedLink}</>;
7472
})();
7573

7674
return (
@@ -84,7 +82,7 @@ export function ServicePingFailedBanner({
8482
<>
8583
<RefreshLicenseButton />
8684
<Button asChild size="sm" variant="outline">
87-
<a href={DOCS_LINK} target="_blank" rel="noopener noreferrer">
85+
<a href={SERVICE_PING_DOCS_LINK} target="_blank" rel="noopener noreferrer">
8886
Learn more
8987
</a>
9088
</Button>

packages/web/src/app/(app)/components/banners/trialBanner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function TrialBanner({ id, dismissible, now, trialEnd, hasPaymentMethod }
1818

1919
const description = hasPaymentMethod
2020
? "Your subscription will start automatically at the end of the trial."
21-
: "Add a payment method to keep enterprise access after your trial ends.";
21+
: "Add a payment method to keep paid features active after your trial ends.";
2222

2323
return (
2424
<BannerShell

packages/web/src/app/(app)/settings/license/activationCodeCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export function ActivationCodeCard() {
8080
<div className="flex flex-col gap-2">
8181
<p className="font-medium">Activation code</p>
8282
<p className="text-sm text-muted-foreground">
83-
Enter your activation code to enable your enterprise license.
83+
Enter your activation code to enable your Sourcebot license.
8484
</p>
8585
<Separator className="my-2" />
8686
<div className="flex flex-col gap-3">

0 commit comments

Comments
 (0)