mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-06 08:47:23 +00:00
new mobile qr modal approach
This commit is contained in:
1 parent
0925bb9f1c
commit
5429aa0435
1 file changed
+10
-18
@@ -498,26 +498,18 @@ export function WalletModals({
|
|||||||
<div id="qr-reader" className="w-full h-full"></div>
|
<div id="qr-reader" className="w-full h-full"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Dark overlay with centered square cutout using SVG mask */}
|
{/* Dark overlay with centered square cutout */}
|
||||||
<svg className="fixed inset-0 w-full h-full pointer-events-none" style={{ zIndex: 10 }}>
|
<div className="fixed inset-0 pointer-events-none" style={{ zIndex: 10 }}>
|
||||||
<defs>
|
<div
|
||||||
<mask id="qr-scanner-mask">
|
className="absolute inset-0 bg-black/60"
|
||||||
<rect width="100%" height="100%" fill="white" />
|
style={{
|
||||||
<rect
|
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%)'
|
||||||
x="calc(50% - 150px)"
|
}}
|
||||||
y="calc(50% - 150px)"
|
/>
|
||||||
width="300"
|
</div>
|
||||||
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>
|
|
||||||
|
|
||||||
{/* Centered square boundary box */}
|
{/* 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 */}
|
{/* Error message */}
|
||||||
{qrError && (
|
{qrError && (
|
||||||
|
|||||||
Reference in new issue
Block a user