fix(frontend): lower QR code error correction level to reduce density

Closes #1607
This commit is contained in:
erio
2026-04-13 14:06:44 +08:00
parent ad64190bec
commit 24f0eebcf7
3 changed files with 4 additions and 4 deletions

View File

@@ -154,7 +154,7 @@ async function renderQR() {
await QRCode.toCanvas(qrCanvas.value, qrUrl.value, {
width: 220,
margin: 2,
errorCorrectionLevel: logoSrc ? 'H' : 'M',
errorCorrectionLevel: logoSrc ? 'M' : 'L',
})
if (!logoSrc) return
const canvas = qrCanvas.value

View File

@@ -199,7 +199,7 @@ async function renderQR() {
if (!qrCanvas.value || !qrUrl.value) return
await QRCode.toCanvas(qrCanvas.value, qrUrl.value, {
width: 220, margin: 2,
errorCorrectionLevel: 'H',
errorCorrectionLevel: 'M',
})
}

View File

@@ -94,12 +94,12 @@ async function renderQR() {
await nextTick()
if (!qrCanvas.value || !qrUrl.value) return
// Use high error correction to support logo overlay
// Use medium error correction to support logo overlay while keeping QR code scannable
const logoSrc = getLogoForType()
await QRCode.toCanvas(qrCanvas.value, qrUrl.value, {
width: 256,
margin: 2,
errorCorrectionLevel: logoSrc ? 'H' : 'M',
errorCorrectionLevel: logoSrc ? 'M' : 'L',
})
if (!logoSrc) return