From 984a41d0e5990c4ebb5abfa0d911005930a99c69 Mon Sep 17 00:00:00 2001 From: AyrisAI Date: Thu, 20 Aug 2026 18:44:44 +0300 Subject: [PATCH] refactor: simplify QR stand presets to single urban qr-1.svg template --- apps/mobile/src/app/menu/qr.tsx | 90 +++++++++--------- .../src/components/QrStandGeneratorClient.tsx | 82 ++++++++-------- packages/shared/src/qr-stands.ts | 94 +------------------ 3 files changed, 90 insertions(+), 176 deletions(-) diff --git a/apps/mobile/src/app/menu/qr.tsx b/apps/mobile/src/app/menu/qr.tsx index 63bc456..527eb2d 100644 --- a/apps/mobile/src/app/menu/qr.tsx +++ b/apps/mobile/src/app/menu/qr.tsx @@ -283,53 +283,55 @@ export default function QrScreen() { Şablon seçin; QR kodunuz otomatik yerleşsin. Baskıya hazır A5 PDF veya PNG olarak indirin. - {/* Horizontal Theme Selector */} - - {Object.values(QR_STAND_PRESETS).map((preset) => { - const isSelected = preset.key === selectedKey; - return ( - setSelectedKey(preset.key)} - style={{ - backgroundColor: isSelected ? "#1C1917" : "#FFFFFF", - borderWidth: 1.5, - borderColor: isSelected ? "#1C1917" : "#E7E5E4", - borderRadius: 14, - paddingHorizontal: 16, - paddingVertical: 10, - flexDirection: "row", - alignItems: "center", - gap: 8, - }} - > - 1 && ( + + {Object.values(QR_STAND_PRESETS).map((preset) => { + const isSelected = preset.key === selectedKey; + return ( + setSelectedKey(preset.key)} style={{ - width: 14, - height: 14, - borderRadius: 7, - backgroundColor: preset.plaqueColor, - borderWidth: 1, - borderColor: "rgba(255,255,255,0.4)", - }} - /> - - {preset.name} - - - ); - })} - + + + {preset.name} + + + ); + })} + + )} {/* Live Stand Preview Wrapped in ViewShot */} {/* Left Panel: Preset Selectors & Download Controls */}
-
-
- - 1. Stant Teması Seçin - -

- Masa Kartı Şablonları -

-

- Restoranınızın konseptine uygun masa stant tasarımını seçin. -

-
+ {Object.values(QR_STAND_PRESETS).length > 1 && ( +
+
+ + 1. Stant Teması Seçin + +

+ Masa Kartı Şablonları +

+

+ Restoranınızın konseptine uygun masa stant tasarımını seçin. +

+
- {/* Presets List */} -
- {Object.values(QR_STAND_PRESETS).map((preset) => { - const isSelected = preset.key === selectedKey; - return ( - - ); - })} + {isSelected && } + + ); + })} +
-
+ )} {/* Action Download Buttons */}
diff --git a/packages/shared/src/qr-stands.ts b/packages/shared/src/qr-stands.ts index 8bd1dd3..b567ca2 100644 --- a/packages/shared/src/qr-stands.ts +++ b/packages/shared/src/qr-stands.ts @@ -21,26 +21,8 @@ export interface QrStandPreset { export const QR_STAND_PRESETS: Record = { urban: { key: "urban", - name: "Urban Terracotta", - categoryName: "Burger & Fast Casual", - bgGradient: "radial-gradient(circle at 50% 50%, #1a3a29 0%, #0e2016 100%)", - plaqueBg: "linear-gradient(135deg, #a64d2a 0%, #8e3f20 100%)", - plaqueColor: "#a64d2a", - borderAccent: "rgba(255, 255, 255, 0.15)", - qrBg: "#f8f3eb", - qrColor: "#a64d2a", - logoBorder: "#f5be72", - logoBg: "rgba(166, 77, 42, 0.8)", - accentText: "#f5be72", - headerText: "#ffffff", - subText: "rgba(255, 255, 255, 0.9)", - dividerColor: "rgba(255, 255, 255, 0.25)", - categories: ["BURGERS", "FRIES", "SHAKES", "VEGAN OPTIONS"], - }, - "custom-svg-1": { - key: "custom-svg-1", - name: "Urban Premium SVG", - categoryName: "Özel SVG Vektör Şablon", + name: "The Urban Burger QR Stand", + categoryName: "Özel Masa Kartı Şablonu", bgGradient: "radial-gradient(circle at 50% 50%, #1c3e2b 0%, #0e2016 100%)", plaqueBg: "linear-gradient(135deg, #a64d2a 0%, #8e3f20 100%)", plaqueColor: "#a64d2a", @@ -56,76 +38,4 @@ export const QR_STAND_PRESETS: Record = { categories: ["BURGERS", "FRIES", "SHAKES", "VEGAN OPTIONS"], svgTemplateUrl: "/qr-1.svg", }, - "la-maison": { - key: "la-maison", - name: "La Maison Gold", - categoryName: "Fine Dining & Steakhouse", - bgGradient: "radial-gradient(circle at 50% 50%, #18181b 0%, #09090b 100%)", - plaqueBg: "linear-gradient(135deg, #1c1917 0%, #0c0a09 100%)", - plaqueColor: "#1c1917", - borderAccent: "rgba(200, 169, 107, 0.4)", - qrBg: "#faf8f5", - qrColor: "#1c1917", - logoBorder: "#c8a96b", - logoBg: "rgba(28, 25, 23, 0.9)", - accentText: "#c8a96b", - headerText: "#ffffff", - subText: "#d6d3d1", - dividerColor: "rgba(200, 169, 107, 0.3)", - categories: ["BAŞLANGIÇLAR", "ANA YEMEKLER", "ŞARAPLAR", "TATLILAR"], - }, - nordic: { - key: "nordic", - name: "Nordic Minimal", - categoryName: "Kafe, Fırın & Kahve", - bgGradient: "radial-gradient(circle at 50% 50%, #e7e5e4 0%, #d6d3d1 100%)", - plaqueBg: "linear-gradient(135deg, #ffffff 0%, #f5f5f4 100%)", - plaqueColor: "#ffffff", - borderAccent: "rgba(0, 0, 0, 0.08)", - qrBg: "#18181b", - qrColor: "#ffffff", - logoBorder: "#18181b", - logoBg: "#ffffff", - accentText: "#18181b", - headerText: "#18181b", - subText: "#78716c", - dividerColor: "rgba(0, 0, 0, 0.12)", - categories: ["ESPRESSO BARI", "FROZEN & İÇECEK", "KRUVASAN", "TATLILAR"], - }, - bistro: { - key: "bistro", - name: "Classic Bistro", - categoryName: "Pizzeria & İtalyan", - bgGradient: "radial-gradient(circle at 50% 50%, #3f1212 0%, #240a0a 100%)", - plaqueBg: "linear-gradient(135deg, #8b1e1e 0%, #6e1616 100%)", - plaqueColor: "#8b1e1e", - borderAccent: "rgba(255, 235, 200, 0.2)", - qrBg: "#fffbeb", - qrColor: "#8b1e1e", - logoBorder: "#f59e0b", - logoBg: "rgba(139, 30, 30, 0.85)", - accentText: "#fbbf24", - headerText: "#fffbeb", - subText: "#fef3c7", - dividerColor: "rgba(255, 235, 200, 0.3)", - categories: ["ODUN ATEŞİ PİZZA", "MAKARNALAR", "SALATALAR", "TİRAMİSU"], - }, - neon: { - key: "neon", - name: "Neon Sapphire", - categoryName: "Bar, Pub & Nightlife", - bgGradient: "radial-gradient(circle at 50% 50%, #0f172a 0%, #020617 100%)", - plaqueBg: "linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%)", - plaqueColor: "#1e1b4b", - borderAccent: "rgba(99, 102, 241, 0.4)", - qrBg: "#e0e7ff", - qrColor: "#312e81", - logoBorder: "#818cf8", - logoBg: "rgba(30, 27, 75, 0.9)", - accentText: "#818cf8", - headerText: "#ffffff", - subText: "#c7d2fe", - dividerColor: "rgba(99, 102, 241, 0.3)", - categories: ["İMKAN KOKTEYLLER", "BİRALAR", "ATIŞTIRMALIKLAR", "MÜZİK & ETKİNLİK"], - }, };