diff --git a/apps/website/app/[locale]/license/success/page.tsx b/apps/website/app/[locale]/license/success/page.tsx new file mode 100644 index 0000000..73b8274 --- /dev/null +++ b/apps/website/app/[locale]/license/success/page.tsx @@ -0,0 +1,111 @@ +"use client"; +import { Container } from "@/components/Container"; +import { Button } from "@/components/ui/button"; +import confetti from "canvas-confetti"; +import { CheckCircle2, Copy, Terminal } from "lucide-react"; +import Link from "next/link"; +import { useEffect, useState } from "react"; + +export default function LicenseSuccess() { + const [copied, setCopied] = useState(false); + // Generate a realistic-looking API key + const apiKey = `dk_live_${Array.from( + crypto.getRandomValues(new Uint8Array(24)), + ) + .map((b) => b.toString(16).padStart(2, "0")) + .join("")}`; + + useEffect(() => { + // Launch confetti when the page loads + confetti({ + particleCount: 150, + spread: 100, + origin: { y: 0.6 }, + }); + }, []); + + const copyToClipboard = () => { + navigator.clipboard.writeText(apiKey); + setCopied(true); + setTimeout(() => setCopied(false), 2000); + }; + + return ( +
+
+ + +
+
+
+ +
+
+ +

+ Thank you for your purchase! +

+ +

+ Your Dokploy license has been successfully activated. Here's your + API key to get started. +

+ +
+
+ +
+
+ + {apiKey} + + +
+ +
+

+ To start using your license, add this API key to your + configuration file: +

+
+										
+											{`# .env
+DOKPLOY_LICENSE_KEY=${apiKey}`}
+										
+									
+
+
+
+
+ +
+ + + + + + +
+
+
+
+ ); +} diff --git a/apps/website/components/pricing.tsx b/apps/website/components/pricing.tsx index 9d2587d..eac3a7e 100644 --- a/apps/website/components/pricing.tsx +++ b/apps/website/components/pricing.tsx @@ -167,8 +167,6 @@ export function Pricing() { const { sessionId } = await response.json(); - console.log(sessionId); - // Redirect to Stripe checkout const { error } = await stripe.redirectToCheckout({ sessionId, diff --git a/apps/website/package.json b/apps/website/package.json index 7429a80..c49f285 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -30,6 +30,7 @@ "@types/turndown": "^5.0.5", "autoprefixer": "^10.4.12", "axios": "^1.8.1", + "canvas-confetti": "^1.9.3", "class-variance-authority": "^0.7.0", "clsx": "^2.1.0", "framer-motion": "^11.3.19", @@ -62,6 +63,7 @@ "@babel/parser": "^7.26.9", "@babel/plugin-syntax-typescript": "^7.25.9", "@biomejs/biome": "1.7.0", + "@types/canvas-confetti": "^1.9.0", "@types/react": "18.3.5", "@types/react-dom": "18.3.0", "prettier-plugin-tailwindcss": "^0.5.14" diff --git a/apps/website/public/grid.svg b/apps/website/public/grid.svg new file mode 100644 index 0000000..f0dfe65 --- /dev/null +++ b/apps/website/public/grid.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a2c267e..dff7347 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -145,6 +145,9 @@ importers: axios: specifier: ^1.8.1 version: 1.8.1 + canvas-confetti: + specifier: ^1.9.3 + version: 1.9.3 class-variance-authority: specifier: ^0.7.0 version: 0.7.0 @@ -236,6 +239,9 @@ importers: '@biomejs/biome': specifier: 1.7.0 version: 1.7.0 + '@types/canvas-confetti': + specifier: ^1.9.0 + version: 1.9.0 '@types/react': specifier: 18.3.5 version: 18.3.5 @@ -1693,6 +1699,9 @@ packages: '@types/acorn@4.0.6': resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} + '@types/canvas-confetti@1.9.0': + resolution: {integrity: sha512-aBGj/dULrimR1XDZLtG9JwxX1b4HPRF6CX9Yfwh3NvstZEm1ZL7RBnel4keCPSqs1ANRu1u2Aoz9R+VmtjYuTg==} + '@types/conventional-commits-parser@5.0.0': resolution: {integrity: sha512-loB369iXNmAZglwWATL+WRe+CRMmmBPtpolYzIebFaX4YA3x+BEfLqhUAV9WanycKI3TG1IMr5bMJDajDKLlUQ==} @@ -1900,6 +1909,9 @@ packages: caniuse-lite@1.0.30001679: resolution: {integrity: sha512-j2YqID/YwpLnKzCmBOS4tlZdWprXm3ZmQLBH9ZBXFOhoxLA46fwyBvx6toCBWBmnuwUY/qB3kEU6gFx8qgCroA==} + canvas-confetti@1.9.3: + resolution: {integrity: sha512-rFfTURMvmVEX1gyXFgn5QMn81bYk70qa0HLzcIOSVEyl57n6o9ItHeBtUSWdvKAPY0xlvBHno4/v3QPrT83q9g==} + ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} @@ -5440,6 +5452,8 @@ snapshots: dependencies: '@types/estree': 1.0.5 + '@types/canvas-confetti@1.9.0': {} + '@types/conventional-commits-parser@5.0.0': dependencies: '@types/node': 20.17.16 @@ -5641,6 +5655,8 @@ snapshots: caniuse-lite@1.0.30001679: {} + canvas-confetti@1.9.3: {} + ccount@2.0.1: {} chalk@2.4.2: