Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

feat: add lock icon to protected link cards

Snazzahe142dd3beb38
diff --git a/apps/web/ui/links/link-card.tsx b/apps/web/ui/links/link-card.tsx
index 795e30db00..1dad7c05c5 100644
--- a/apps/web/ui/links/link-card.tsx
+++ b/apps/web/ui/links/link-card.tsx
@@ -44,6 +44,7 @@ import {
MessageCircle,
QrCode,
TimerOff,
+ Lock,
} from "lucide-react";
import Link from "next/link";
import { useParams } from "next/navigation";
@@ -66,6 +67,7 @@ export default function LinkCard({
domain,
url,
rewrite,
+ password,
expiresAt,
createdAt,
lastClicked,
@@ -397,6 +399,19 @@ export default function LinkCard({
<EyeOff className="xs:block hidden h-4 w-4 text-gray-500" />
</Tooltip>
)}
+ {password && (
+ <Tooltip
+ content={
+ <SimpleTooltipContent
+ title="This link is password-protected."
+ cta="Learn more."
+ href={`${HOME_DOMAIN}/help/article/password-protected-links`}
+ />
+ }
+ >
+ <Lock className="xs:block hidden h-4 w-4 text-gray-500" />
+ </Tooltip>
+ )}
<a
href={url}
target="_blank"