Barcode workflow
This commit is contained in:
@@ -4,7 +4,11 @@ const nextConfig = {
|
|||||||
skipTrailingSlashRedirect: true,
|
skipTrailingSlashRedirect: true,
|
||||||
images: {
|
images: {
|
||||||
unoptimized: false,
|
unoptimized: false,
|
||||||
domains: ['www.qrmaster.net', 'qrmaster.net', 'images.qrmaster.net'],
|
remotePatterns: [
|
||||||
|
{ protocol: 'https', hostname: 'www.qrmaster.net' },
|
||||||
|
{ protocol: 'https', hostname: 'qrmaster.net' },
|
||||||
|
{ protocol: 'https', hostname: 'images.qrmaster.net' },
|
||||||
|
],
|
||||||
formats: ['image/webp', 'image/avif'],
|
formats: ['image/webp', 'image/avif'],
|
||||||
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
|
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
|
||||||
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
|
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ export default function CreatePage() {
|
|||||||
case 'FEEDBACK':
|
case 'FEEDBACK':
|
||||||
return content.feedbackUrl || 'https://example.com/feedback';
|
return content.feedbackUrl || 'https://example.com/feedback';
|
||||||
case 'BARCODE':
|
case 'BARCODE':
|
||||||
return content.value || '';
|
return isDynamic ? (content.url || '') : (content.value || '');
|
||||||
default:
|
default:
|
||||||
return 'https://example.com';
|
return 'https://example.com';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -209,10 +209,10 @@ END:VCARD`;
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div id={`qr-svg-${qr.id}`} className={qr.style?.cornerStyle === 'rounded' ? 'rounded-lg overflow-hidden' : ''}>
|
<div id={`qr-svg-${qr.id}`} className={qr.style?.cornerStyle === 'rounded' ? 'rounded-lg overflow-hidden' : ''}>
|
||||||
{qr.contentType === 'BARCODE' && qr.type === 'STATIC' ? (
|
{qr.contentType === 'BARCODE' ? (
|
||||||
<Barcode
|
<Barcode
|
||||||
key={`${qr.content?.value}-${qr.content?.format}`}
|
key={`${qr.id}-${qr.type === 'STATIC' ? qr.content?.value : qrUrl}-${qr.content?.format}`}
|
||||||
value={qr.content?.value || '123456789'}
|
value={qr.type === 'STATIC' ? (qr.content?.value || '123456789') : qrUrl}
|
||||||
format={(qr.content?.format as any) || 'CODE128'}
|
format={(qr.content?.format as any) || 'CODE128'}
|
||||||
lineColor={qr.style?.foregroundColor || '#000000'}
|
lineColor={qr.style?.foregroundColor || '#000000'}
|
||||||
background={qr.style?.backgroundColor || '#FFFFFF'}
|
background={qr.style?.backgroundColor || '#FFFFFF'}
|
||||||
|
|||||||
Reference in New Issue
Block a user