new mobile qr modal approach

This commit is contained in:
lemonknowsall committed 2025-10-27 14:49:05 -07:00
1 parent 0925bb9f1c
commit 5429aa0435
1 file changed
+10 -18
+10 -18
View File
@@ -498,26 +498,18 @@ export function WalletModals({
<div id="qr-reader" className="w-full h-full"></div>
</div>
{/* Dark overlay with centered square cutout using SVG mask */}
<svg className="fixed inset-0 w-full h-full pointer-events-none" style={{ zIndex: 10 }}>
<defs>
<mask id="qr-scanner-mask">
<rect width="100%" height="100%" fill="white" />
<rect
x="calc(50% - 150px)"
y="calc(50% - 150px)"
width="300"
height="300"
rx="8"
fill="black"
/>
</mask>
</defs>
<rect width="100%" height="100%" fill="rgba(0, 0, 0, 0.6)" mask="url(#qr-scanner-mask)" />
</svg>
{/* Dark overlay with centered square cutout */}
<div className="fixed inset-0 pointer-events-none" style={{ zIndex: 10 }}>
<div
className="absolute inset-0 bg-black/60"
style={{
clipPath: 'polygon(0% 0%, 0% 100%, calc(50% - 150px) 100%, calc(50% - 150px) calc(50% - 150px), calc(50% + 150px) calc(50% - 150px), calc(50% + 150px) calc(50% + 150px), calc(50% - 150px) calc(50% + 150px), calc(50% - 150px) 100%, 100% 100%, 100% 0%)'
}}
/>
</div>
{/* Centered square boundary box */}
<div className="fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[300px] h-[300px] border-2 border-white rounded-lg pointer-events-none" style={{ zIndex: 20 }}></div>
<div className="fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[300px] h-[300px] border-2 border-white pointer-events-none" style={{ zIndex: 20 }}></div>
{/* Error message */}
{qrError && (