feat(qr): complete QR studio, dynamic google fonts, mouse canvas drag, and template sync

This commit is contained in:
AyrisAI
2026-08-22 16:00:30 +03:00
parent c1569c0879
commit e7ba6c7807
34 changed files with 5689 additions and 1251 deletions
@@ -9,11 +9,12 @@ import Svg, {
Text,
Image,
} from "react-native-svg";
import { type QrTemplateProps, getFontFamily, renderSvgLines } from "./index";
import { type QrTemplateProps, getFontFamily, renderSvgLines } from "./common";
const QrTemplate6 = ({
qrBase64,
fields,
hideQr,
...props
}: QrTemplateProps) => {
const rName = fields?.restaurantName;
@@ -113,59 +114,61 @@ const QrTemplate6 = ({
<Use href="#b6" transform="matrix(-.95 0 0 .95 360 360)" />
{/* QR Placeholder / Gerçek QR */}
<G transform="translate(95 205)">
<Path
fill="#fdfbf7"
stroke="#122a42"
strokeWidth={3}
d="M0 0h210v210H0z"
/>
<Path
fill="none"
stroke="#c59b58"
strokeWidth={1.5}
d="M4 4h202v202H4z"
/>
{qrBase64 ? (
<Image
href={`data:image/png;base64,${qrBase64}`}
x={10}
y={10}
width={190}
height={190}
{!hideQr && (
<G transform="translate(95 205)">
<Path
fill="#fdfbf7"
stroke="#122a42"
strokeWidth={3}
d="M0 0h210v210H0z"
/>
) : (
<>
<Path
fill="#faf8f5"
stroke="#122a42"
strokeDasharray="4 3"
d="M12 12h186v186H12z"
<Path
fill="none"
stroke="#c59b58"
strokeWidth={1.5}
d="M4 4h202v202H4z"
/>
{qrBase64 ? (
<Image
href={`data:image/png;base64,${qrBase64}`}
x={10}
y={10}
width={190}
height={190}
/>
<Circle
cx={105}
cy={95}
r={16}
fill="#f6efe3"
stroke="#c59b58"
strokeWidth={1.2}
/>
<Use href="#a6" transform="matrix(.45 0 0 .45 105 93)" />
<Text
x={105}
y={128}
fill="#122a42"
fontFamily="System, sans-serif"
fontSize={11}
fontWeight="bold"
letterSpacing={1.5}
textAnchor="middle"
>
{"QR KOD ALANI"}
</Text>
</>
)}
</G>
) : (
<>
<Path
fill="#faf8f5"
stroke="#122a42"
strokeDasharray="4 3"
d="M12 12h186v186H12z"
/>
<Circle
cx={105}
cy={95}
r={16}
fill="#f6efe3"
stroke="#c59b58"
strokeWidth={1.2}
/>
<Use href="#a6" transform="matrix(.45 0 0 .45 105 93)" />
<Text
x={105}
y={128}
fill="#122a42"
fontFamily="System, sans-serif"
fontSize={11}
fontWeight="bold"
letterSpacing={1.5}
textAnchor="middle"
>
{"QR KOD ALANI"}
</Text>
</>
)}
</G>
)}
{/* Metinler */}
<G textAnchor="middle">