feat(mobile): add full text editing, show/hide switches and font family selector for QR stands

This commit is contained in:
AyrisAI
2026-08-21 00:36:14 +03:00
parent 932c174b5f
commit 4dbb68a73a
5 changed files with 712 additions and 234 deletions
@@ -1,6 +1,5 @@
import * as React from "react";
import Svg, {
SvgProps,
Path,
Rect,
Circle,
@@ -8,12 +7,24 @@ import Svg, {
Text,
Image,
} from "react-native-svg";
import type { QrTemplateProps } from "./index";
interface QrTemplateLumiereProps extends SvgProps {
qrBase64?: string;
}
const QrTemplate1 = ({ qrBase64, ...props }: QrTemplateLumiereProps) => (
const QrTemplateLumiere = ({
qrBase64,
restaurantName = "LUMIÈRE",
subtitle = "RESTAURANT & BAR | MODERN CUISINE",
tableNo = "MASA NO: 01",
ctaText = "MENÜYÜ GÖRMEK İÇİN OKUTUN",
wifiText = "WiFi: Lumiere_Guest | Şifre: lumiere2026",
socialText = "Rezervasyon: 0212 555 0199",
fontFamily = "'Playfair Display', Georgia, serif",
showTableNo = true,
showSubtitle = true,
showCta = true,
showWifi = true,
showSocial = true,
...props
}: QrTemplateProps) => (
<Svg
viewBox="0 0 600 600"
width={300}
@@ -78,6 +89,7 @@ const QrTemplate1 = ({ qrBase64, ...props }: QrTemplateLumiereProps) => (
d="M560 532a18 18 0 0 0-28 28"
/>
<Circle cx={548} cy={548} r={2} fill="#d4af37" />
{/* Merkez amblem */}
<G transform="translate(300 85)">
<Path
@@ -97,6 +109,7 @@ const QrTemplate1 = ({ qrBase64, ...props }: QrTemplateLumiereProps) => (
/>
<Circle cy={10} r={1.8} fill="#d4af37" />
</G>
{/* Yatay çizgi */}
<Path
stroke="#d4af37"
@@ -104,6 +117,7 @@ const QrTemplate1 = ({ qrBase64, ...props }: QrTemplateLumiereProps) => (
strokeWidth={0.8}
d="M120 198h360"
/>
{/* QR Placeholder / Gerçek QR */}
<G transform="translate(190 215)">
<Rect
@@ -149,65 +163,90 @@ const QrTemplate1 = ({ qrBase64, ...props }: QrTemplateLumiereProps) => (
</>
)}
</G>
{/* Metinler */}
<G textAnchor="middle">
<Text
x={300}
y={152}
fill="#d4af37"
fontFamily="'Playfair Display', 'Cinzel', 'Didot', Georgia, serif"
fontSize={38}
fontWeight={500}
letterSpacing={6}
>
{"LUMI\xC8RE"}
</Text>
<Text
x={300}
y={180}
fill="#e5c378"
fontFamily="Inter, Arial, sans-serif"
fontSize={11}
fontWeight={600}
letterSpacing={4}
>
{"RESTAURANT & BAR | MODERN CUISINE"}
</Text>
<Text
x={300}
y={472}
fill="#d4af37"
fontFamily="Inter, Arial, sans-serif"
fontSize={13}
fontWeight={600}
letterSpacing={3}
>
{"SCAN WITH CAMERA"}
</Text>
<Text
x={300}
y={508}
fill="#e2ddd2"
fontFamily="Inter, Arial, sans-serif"
fontSize={10.5}
fontWeight={400}
letterSpacing={1.2}
>
{"Reservations: LumiereDining.com | 240-555-0199"}
</Text>
<Text
x={300}
y={528}
fill="#c5a059"
fontFamily="Inter, Arial, sans-serif"
fontSize={9.5}
fontWeight={500}
letterSpacing={1.8}
>
{"TABLE 01 \u2022 WIFI: Lumiere_Guest"}
</Text>
{/* Restoran Adı */}
{restaurantName ? (
<Text
x={300}
y={150}
fill="#d4af37"
fontFamily={fontFamily}
fontSize={32}
fontWeight={700}
letterSpacing={4}
>
{restaurantName}
</Text>
) : null}
{/* Slogan / Alt Başlık */}
{showSubtitle && subtitle ? (
<Text
x={300}
y={180}
fill="#e5c378"
fontFamily="Inter, Arial, sans-serif"
fontSize={11}
fontWeight={600}
letterSpacing={3}
>
{subtitle}
</Text>
) : null}
{/* CTA / Yönlendirme */}
{showCta && ctaText ? (
<Text
x={300}
y={472}
fill="#d4af37"
fontFamily={fontFamily}
fontSize={13}
fontWeight={700}
letterSpacing={2}
>
{ctaText}
</Text>
) : null}
{/* Sosyal / İletişim */}
{showSocial && socialText ? (
<Text
x={300}
y={508}
fill="#e2ddd2"
fontFamily="Inter, Arial, sans-serif"
fontSize={10.5}
fontWeight={500}
letterSpacing={1}
>
{socialText}
</Text>
) : null}
{/* Masa No & WiFi */}
{showTableNo || showWifi ? (
<Text
x={300}
y={528}
fill="#c5a059"
fontFamily="Inter, Arial, sans-serif"
fontSize={10}
fontWeight={600}
letterSpacing={1}
>
{[
showTableNo && tableNo ? tableNo : "",
showWifi && wifiText ? wifiText : "",
]
.filter(Boolean)
.join(" • ")}
</Text>
) : null}
</G>
</Svg>
);
export default QrTemplate1;
export default QrTemplateLumiere;