mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-05 08:23:35 +00:00
full screen scanner
This commit is contained in:
1 parent
5429aa0435
commit
25a5151e38
1 file changed
+3
-19
@@ -492,28 +492,12 @@ export function WalletModals({
|
||||
stopScanning();
|
||||
}
|
||||
}}>
|
||||
<DialogContent className="max-w-full w-screen h-screen flex flex-col items-center justify-center p-0 bg-black border-0 [&>button]:fixed [&>button]:top-4 [&>button]:right-4 [&>button]:z-50 [&>button]:text-white [&>button]:hover:bg-black/70">
|
||||
{/* Full-screen camera container */}
|
||||
<div className="fixed inset-0">
|
||||
<div id="qr-reader" className="w-full h-full"></div>
|
||||
</div>
|
||||
|
||||
{/* 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 pointer-events-none" style={{ zIndex: 20 }}></div>
|
||||
<DialogContent className="max-w-full w-screen h-screen p-0 bg-black border-0 [&>button]:absolute [&>button]:top-4 [&>button]:right-4 [&>button]:z-50 [&>button]:text-white [&>button]:bg-black/50 [&>button]:hover:bg-black/70">
|
||||
<div id="qr-reader" className="w-full h-full"></div>
|
||||
|
||||
{/* Error message */}
|
||||
{qrError && (
|
||||
<div className="fixed top-20 left-4 right-4 p-3 bg-destructive text-destructive-foreground rounded" style={{ zIndex: 50 }}>
|
||||
<div className="absolute bottom-20 left-4 right-4 p-3 bg-destructive text-destructive-foreground rounded z-50">
|
||||
{qrError}
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user