Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

💄 Mark Pro features with a lock icon instead of a Pro badge (#3631)

Luke Vellacce366fdb228
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.json
index f092e7187..9725ff01c 100644
--- a/apps/web/public/locales/en/app.json
+++ b/apps/web/public/locales/en/app.json
@@ -882,6 +882,7 @@
"primaryColorSettingHint": "Used for buttons and highlights.",
"primaryColorSettingTitle": "Primary color",
"privacyPolicy": "Privacy policy",
+ "proBadgeUnlock": "Unlock with Rallly Pro",
"profile": "Profile",
"profileAccount": "Account",
"profileDescription": "Change your profile settings",
diff --git a/apps/web/src/features/billing/components/pro-badge.tsx b/apps/web/src/features/billing/components/pro-badge.tsx
index e091de1c9..b94462237 100644
--- a/apps/web/src/features/billing/components/pro-badge.tsx
+++ b/apps/web/src/features/billing/components/pro-badge.tsx
@@ -1,11 +1,29 @@
-import { Badge } from "@rallly/ui/badge";
+"use client";
-import { PLAN_NAMES } from "@/features/billing/constants";
+import { cn } from "@rallly/ui";
+import { Tooltip, TooltipContent, TooltipTrigger } from "@rallly/ui/tooltip";
+import { LockIcon } from "lucide-react";
+import { Trans } from "@/i18n/client";
+
+/** Marks a feature the space unlocks by upgrading to Pro. */
export const ProBadge = ({ className }: { className?: string }) => {
+ const label = (
+ <Trans i18nKey="proBadgeUnlock" defaults="Unlock with Rallly Pro" />
+ );
return (
- <Badge size="sm" variant="secondary" className={className}>
- {PLAN_NAMES.PRO}
- </Badge>
+ <Tooltip>
+ <TooltipTrigger
+ render={<span />}
+ className={cn(
+ "inline-flex size-5 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary",
+ className,
+ )}
+ >
+ <LockIcon aria-hidden="true" className="size-3" />
+ <span className="sr-only">{label}</span>
+ </TooltipTrigger>
+ <TooltipContent side="top">{label}</TooltipContent>
+ </Tooltip>
);
};
diff --git a/apps/web/src/features/poll/components/invite-by-email.tsx b/apps/web/src/features/poll/components/invite-by-email.tsx
index cee92e4d2..fcaa6bebf 100644
--- a/apps/web/src/features/poll/components/invite-by-email.tsx
+++ b/apps/web/src/features/poll/components/invite-by-email.tsx
@@ -238,14 +238,13 @@ export function InviteByEmail({
</InputGroup>
<Button
type="submit"
- variant="primary"
+ // Free spaces get the pay wall, not a send, so the button stays quiet
+ variant={isFree ? "default" : "primary"}
disabled={!isOpen}
aria-describedby={isOpen ? undefined : "share-dialog-closed-reason"}
>
<Trans i18nKey="shareDialogSendInvite" defaults="Send invite" />
- {isFree ? (
- <ProBadge className="ml-1.5 bg-primary-foreground/20 text-primary-foreground" />
- ) : null}
+ {isFree ? <ProBadge /> : null}
</Button>
</form>
{!isOpen ? (