This commit is contained in:
Timo Knuth
2025-10-17 13:45:33 +02:00
parent cd3ee5fc8f
commit 254e6490b8
36 changed files with 1712 additions and 917 deletions

View File

@@ -60,12 +60,8 @@ export default function CreatePage() {
const contentTypes = [
{ value: 'URL', label: 'URL / Website' },
{ value: 'WIFI', label: 'WiFi Network' },
{ value: 'VCARD', label: 'Contact Card' },
{ value: 'PHONE', label: 'Phone Number' },
{ value: 'EMAIL', label: 'Email' },
{ value: 'SMS', label: 'SMS' },
{ value: 'TEXT', label: 'Plain Text' },
{ value: 'WHATSAPP', label: 'WhatsApp' },
{ value: 'PHONE', label: 'Phone Number' },
];
// Get QR content based on content type
@@ -159,7 +155,7 @@ export default function CreatePage() {
title,
contentType,
content,
isStatic: !isDynamic, // Add this flag
isStatic: !isDynamic,
tags: tags.split(',').map(t => t.trim()).filter(Boolean),
style: {
// FREE users can only use black/white
@@ -291,7 +287,7 @@ export default function CreatePage() {
return (
<div className="max-w-6xl mx-auto">
<div className="mb-8">
<h1 className="text-3xl font-bold text-gray-900">{t('create.title')}</h1>
<h1 className="text-3xl font-bold text-gray-900">Create QR Code</h1>
</div>
<form onSubmit={handleSubmit}>
@@ -333,7 +329,7 @@ export default function CreatePage() {
{/* QR Type Section */}
<Card>
<CardHeader>
<CardTitle>{t('create.type')}</CardTitle>
<CardTitle>QR Code Type</CardTitle>
</CardHeader>
<CardContent>
<div className="flex items-center space-x-4">
@@ -354,22 +350,14 @@ export default function CreatePage() {
onChange={() => setIsDynamic(false)}
className="mr-2"
/>
<span className="font-medium">Static (Direct URL)</span>
<span className="font-medium">Static</span>
</label>
</div>
<p className="text-sm text-gray-600 mt-2">
{isDynamic
{isDynamic
? '✅ Dynamic: Track scans, edit URL later, view analytics. QR contains tracking link.'
: '⚡ Static: Direct to URL, no tracking, cannot edit. QR contains actual URL.'}
: '⚡ Static: Direct to content, no tracking, cannot edit. QR contains actual content.'}
</p>
{isDynamic && (
<div className="mt-3 p-3 bg-blue-50 rounded-lg">
<p className="text-sm text-blue-900">
<strong>Note:</strong> Dynamic QR codes route through your server for tracking.
In production, deploy your app to get a public URL instead of localhost.
</p>
</div>
)}
</CardContent>
</Card>