"...components/admin/git@web.lueluesay.top:chenxi/sub2api.git" did not exist on "6925ac25c4d8a9e9af77403c54529a5f06e78c91"
Commit 24f0eebc authored by erio's avatar erio
Browse files

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

Closes #1607
parent ad64190b
......@@ -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
......
......@@ -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',
})
}
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment