feat(invite): download the room QR code as a PNG
The invite QR was display-only. Add a "Download QR" button that exports it as a PNG via an offscreen high-resolution (1024px, spec 4-module quiet zone) QRCodeCanvas + canvas.toBlob, saved through useSaveFile (filename from the room name) with the standard download toast. The visible code stays an SVG so it renders crisply at any size/theme. Also corrects the stale LOTUS_FEATURES note (the QR is generated locally via qrcode.react, not api.qrserver.com). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -1102,7 +1102,8 @@ Persists via the `homeRoomSort` setting.
|
||||
|
||||
`RoomShareInvite.tsx` provides a shareable invite UI:
|
||||
|
||||
- 160×160px QR code generated via `api.qrserver.com`
|
||||
- 160×160px QR code generated locally via `qrcode.react` (`QRCodeSVG`) — no third-party service, works offline and under strict CSP, on a white quiet-zone so it scans on any theme
|
||||
- **Download QR**: exports the code as a PNG via an offscreen high-resolution (1024px, spec 4-module margin) `QRCodeCanvas` + `canvas.toBlob`, saved through `useSaveFile` (filename derived from the room name) with the standard download toast
|
||||
- "Copy Link" button to copy the `matrix.to` URI
|
||||
- Also accessible via a toggle button (⊞) in the Invite modal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user