From a457e1ef7de449e4f758fc6943a8014e952c34c6 Mon Sep 17 00:00:00 2001
From: Ephraim Duncan <55143799+ephraimduncan@users.noreply.github.com>
Date: Mon, 27 Jul 2026 02:18:03 +0000
Subject: [PATCH] feat: add copy button for license key in admin panel (#3123)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## Description
Adds a copy button next to the show/hide toggle for the license key in
the admin panel license card (Admin Panel → Stats).
- Ghost button matching the existing eye-toggle styling (`h-6 w-6`,
`CopyIcon`)
- Uses the standard `useCopyToClipboard` + toast pattern (same as
`template-direct-link-badge.tsx`)
- Copies the key regardless of masked/visible state
New translation strings will be picked up by the next `chore: extract
translations` run.
## Before / After

> Screenshots taken against a locally mocked ACTIVE license (the mock is
not part of this PR).
## Testing
- `npx tsc --noEmit -p apps/remix` clean
- `biome check` clean
- Smoke-tested in browser: clicking the button fires the "Copied to
clipboard" toast (visible in the screenshot above)
---
.../components/general/admin-license-card.tsx | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/apps/remix/app/components/general/admin-license-card.tsx b/apps/remix/app/components/general/admin-license-card.tsx
index c3a3428df..3e8c39192 100644
--- a/apps/remix/app/components/general/admin-license-card.tsx
+++ b/apps/remix/app/components/general/admin-license-card.tsx
@@ -1,3 +1,4 @@
+import { useCopyToClipboard } from '@documenso/lib/client-only/hooks/use-copy-to-clipboard';
import type { TCachedLicense } from '@documenso/lib/types/license';
import { SUBSCRIPTION_CLAIM_FEATURE_FLAGS } from '@documenso/lib/types/subscription';
import { trpc } from '@documenso/trpc/react';
@@ -9,6 +10,7 @@ import { Trans, useLingui } from '@lingui/react/macro';
import {
ArrowRightIcon,
CheckCircle2Icon,
+ CopyIcon,
EyeIcon,
EyeOffIcon,
KeyRoundIcon,
@@ -29,6 +31,8 @@ type AdminLicenseCardProps = {
export const AdminLicenseCard = ({ licenseData }: AdminLicenseCardProps) => {
const { t, i18n } = useLingui();
+ const { toast } = useToast();
+ const [, copy] = useCopyToClipboard();
const [isLicenseKeyVisible, setIsLicenseKeyVisible] = useState(false);
const { license } = licenseData || {};
@@ -147,6 +151,24 @@ export const AdminLicenseCard = ({ licenseData }: AdminLicenseCardProps) => {
>
{isLicenseKeyVisible ? : }
+
+