fix(qr-stands): restore exact user-provided qr-1.svg alongside qr-4.svg

This commit is contained in:
AyrisAI
2026-08-20 23:31:54 +03:00
parent edb7af9288
commit 18396f3b99
5 changed files with 38 additions and 287 deletions
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 1.6 MiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 1.6 MiB

@@ -208,17 +208,23 @@ export function QrStandGeneratorClient({
{activePreset.svgTemplateUrl ? ( {activePreset.svgTemplateUrl ? (
<div <div
ref={standRef} ref={standRef}
className="w-[360px] sm:w-[380px] aspect-[400/650] rounded-[2.5rem] relative overflow-hidden shadow-[0_25px_60px_rgba(0,0,0,0.6)] border-2 border-white/10" className={`w-[360px] sm:w-[380px] rounded-[2.5rem] relative overflow-hidden shadow-[0_25px_60px_rgba(0,0,0,0.6)] border-2 border-white/10 ${
activePreset.aspectRatio === "672/900" ? "aspect-[672/900]" : "aspect-[400/650]"
}`}
> >
{/* SVG Template Vector Background Graphic */} {/* Exact SVG Template Vector Background Graphic */}
<img <img
src={activePreset.svgTemplateUrl} src={activePreset.svgTemplateUrl}
alt={activePreset.name} alt={activePreset.name}
className="absolute inset-0 w-full h-full object-contain pointer-events-none" className="absolute inset-0 w-full h-full object-cover pointer-events-none"
/> />
{/* Dynamic Restaurant Logo & Name Header Overlay */} {/* Dynamic Restaurant Logo & Name Header Overlay */}
<div className="absolute top-[15.5%] left-0 right-0 flex flex-col items-center justify-center px-6 text-center z-10"> <div
className={`absolute left-0 right-0 flex flex-col items-center justify-center px-6 text-center z-10 ${
activePreset.key === "qr-1" ? "top-[13%]" : "top-[15.5%]"
}`}
>
{logoUrl ? ( {logoUrl ? (
<img <img
src={logoUrl} src={logoUrl}
@@ -235,7 +241,13 @@ export function QrStandGeneratorClient({
</div> </div>
{/* Dynamic QR Code Canvas Overlay */} {/* Dynamic QR Code Canvas Overlay */}
<div className="absolute top-[33.1%] left-1/2 -translate-x-1/2 w-[55%] aspect-square rounded-[20px] p-3 shadow-2xl flex items-center justify-center bg-white z-10 border border-zinc-200"> <div
className={`absolute left-1/2 -translate-x-1/2 rounded-[20px] p-3 shadow-2xl flex items-center justify-center bg-white z-10 border border-zinc-200 ${
activePreset.key === "qr-1"
? "top-[37%] w-[52%] aspect-square"
: "top-[33.1%] w-[55%] aspect-square"
}`}
>
<QRCodeCanvas <QRCodeCanvas
value={targetUrl} value={targetUrl}
size={200} size={200}
+18 -15
View File
@@ -16,12 +16,13 @@ export interface QrStandPreset {
dividerColor: string; dividerColor: string;
categories: string[]; categories: string[];
svgTemplateUrl?: string; svgTemplateUrl?: string;
aspectRatio?: string;
} }
export const QR_STAND_PRESETS: Record<string, QrStandPreset> = { export const QR_STAND_PRESETS: Record<string, QrStandPreset> = {
"qr-4": { "qr-4": {
key: "qr-4", key: "qr-4",
name: "Gourmet Gold Luxury Stand", name: "Gourmet Gold Luxury Stand (QR-4)",
categoryName: "Özel Masa Kartı Şablonu", categoryName: "Özel Masa Kartı Şablonu",
bgGradient: "radial-gradient(circle at 50% 50%, #451A03 0%, #1c0a02 100%)", bgGradient: "radial-gradient(circle at 50% 50%, #451A03 0%, #1c0a02 100%)",
plaqueBg: "linear-gradient(135deg, #000000 0%, #111111 100%)", plaqueBg: "linear-gradient(135deg, #000000 0%, #111111 100%)",
@@ -37,25 +38,27 @@ export const QR_STAND_PRESETS: Record<string, QrStandPreset> = {
dividerColor: "rgba(212, 175, 55, 0.3)", dividerColor: "rgba(212, 175, 55, 0.3)",
categories: ["BAŞLANGIÇLAR", "ANA YEMEKLER", "TATLILAR", "İÇECEKLER"], categories: ["BAŞLANGIÇLAR", "ANA YEMEKLER", "TATLILAR", "İÇECEKLER"],
svgTemplateUrl: "/qr-4.svg", svgTemplateUrl: "/qr-4.svg",
aspectRatio: "400/650",
}, },
"qr-1": { "qr-1": {
key: "qr-1", key: "qr-1",
name: "The Urban Burger Stand", name: "The Urban Burger Stand (QR-1)",
categoryName: "Özel Masa Kartı Şablonu", categoryName: "Özel Masa Kartı Şablonu",
bgGradient: "radial-gradient(circle at 50% 50%, #064E3B 0%, #022c22 100%)", bgGradient: "radial-gradient(circle at 50% 50%, #1c3e2b 0%, #0e2016 100%)",
plaqueBg: "linear-gradient(135deg, #141E19 0%, #0B120E 100%)", plaqueBg: "linear-gradient(135deg, #a64d2a 0%, #8e3f20 100%)",
plaqueColor: "#141E19", plaqueColor: "#a64d2a",
borderAccent: "#F59E0B", borderAccent: "rgba(255, 255, 255, 0.15)",
qrBg: "#ffffff", qrBg: "#f8f3eb",
qrColor: "#111111", qrColor: "#a64d2a",
logoBorder: "#F59E0B", logoBorder: "#f5be72",
logoBg: "rgba(20, 30, 25, 0.8)", logoBg: "rgba(166, 77, 42, 0.8)",
accentText: "#F59E0B", accentText: "#f5be72",
headerText: "#FFFFFF", headerText: "#ffffff",
subText: "#9CA3AF", subText: "rgba(255, 255, 255, 0.9)",
dividerColor: "rgba(245, 158, 11, 0.3)", dividerColor: "rgba(255, 255, 255, 0.25)",
categories: ["BURGERS", "FRIES", "SHAKES", "BEVERAGES"], categories: ["BURGERS", "FRIES", "SHAKES", "VEGAN OPTIONS"],
svgTemplateUrl: "/qr-1.svg", svgTemplateUrl: "/qr-1.svg",
aspectRatio: "672/900",
}, },
}; };
+1 -89
View File
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 1.6 MiB