feat: integrate Stripe for self-hosted license purchasing and update pricing component

This commit is contained in:
Mauricio Siu
2025-03-20 01:19:39 -06:00
parent e433edd7b7
commit 3d622c7a53
7 changed files with 278 additions and 32 deletions

File diff suppressed because one or more lines are too long

View File

@@ -36,7 +36,7 @@ const NumberInput = React.forwardRef<HTMLInputElement, InputProps>(
return (
<Input
type="text"
className={cn("text-left", className)}
className={cn("text-center", className)}
ref={ref}
{...props}
value={props.value === undefined ? undefined : String(props.value)}
@@ -45,7 +45,9 @@ const NumberInput = React.forwardRef<HTMLInputElement, InputProps>(
if (value === "") {
props.onChange?.(e);
} else {
const number = Number.parseInt(value, 10);
// Remove currency symbol and convert to number
const numericValue = value.replace(/[^0-9.]/g, "");
const number = Number.parseFloat(numericValue);
if (!Number.isNaN(number)) {
const syntheticEvent = {
...e,

View File

@@ -181,6 +181,7 @@
"selfHosted": {
"title": "Self-Hosted License",
"description": "Deploy and manage Dokploy on your own infrastructure with enterprise-grade features and support",
"servers": "{serverQuantity} Servers",
"basic": {
"title": "Basic License",
"description": "Perfect for small teams and startups",

View File

@@ -176,6 +176,20 @@
"f7": "Nouvelles mises à jour"
},
"go": "S'abonner"
},
"selfHosted": {
"title": "Licence Auto-hébergée",
"description": "Déployez et gérez Dokploy sur votre propre infrastructure avec des fonctionnalités et un support de niveau entreprise",
"servers": "{serverQuantity} Serveurs",
"features": {
"f1": "Complete Flexibility: Install Dokploy UI on your own infrastructure",
"f2": "Infrastructure Auto-Hébergée",
"f3": "Support de la communauté",
"f4": "Accès à toutes les fonctionnalités",
"f5": "Accès à toutes les mises à jour",
"f9": "Serveurs Illimitées"
},
"go": "Installation"
}
},
"faq": {

View File

@@ -122,6 +122,11 @@
},
"footer": {
"copyright": "版权属于 © {year} Dokploy 保留所有权利"
},
"selfHosted": {
"title": "自托管许可证",
"description": "在您自己的基础设施上部署和管理 Dokploy享受企业级功能和支持",
"servers": "{serverQuantity} 台服务器"
}
},
"404": {

View File

@@ -12,9 +12,9 @@
},
"browserslist": "defaults, not ie <= 11",
"dependencies": {
"hast-util-to-jsx-runtime": "2.3.5",
"@headlessui/react": "^2.2.0",
"@headlessui/tailwindcss": "^0.2.0",
"@prettier/plugin-xml": "^3.4.1",
"@radix-ui/react-accordion": "^1.2.1",
"@radix-ui/react-avatar": "^1.1.1",
"@radix-ui/react-scroll-area": "^1.2.0",
@@ -23,6 +23,7 @@
"@radix-ui/react-switch": "^1.0.3",
"@radix-ui/react-tabs": "1.1.1",
"@radix-ui/react-tooltip": "^1.1.3",
"@stripe/stripe-js": "^6.1.0",
"@tabler/icons-react": "3.21.0",
"@tryghost/content-api": "^1.11.21",
"@types/node": "20.4.6",
@@ -32,9 +33,11 @@
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"framer-motion": "^11.3.19",
"hast-util-to-jsx-runtime": "2.3.5",
"lucide-react": "0.364.0",
"next": "15.2.0",
"next-intl": "^3.26.5",
"prettier": "^3.3.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-ga4": "^2.1.0",
@@ -52,9 +55,7 @@
"tailwindcss-animate": "^1.0.7",
"turndown": "^7.2.0",
"turndown-plugin-gfm": "^1.0.2",
"typescript": "5.1.6",
"prettier": "^3.3.3",
"@prettier/plugin-xml": "^3.4.1"
"typescript": "5.1.6"
},
"devDependencies": {
"@babel/core": "^7.26.9",