From 449988b8e67c13fcb15827d1f723eeb8343390db Mon Sep 17 00:00:00 2001 From: borisovmsw <122969440+borisovmsw@users.noreply.github.com> Date: Tue, 13 Jan 2026 13:45:47 +0300 Subject: [PATCH] fix: fix QR code generation * Update amneziawg.js The QR code doesn't fit/isn't fully visible and can't be scanned. * pixel size QR-code Reduced the pixel size 3 so that the QR code is displayed fully on the smartphone browser. --- .../htdocs/luci-static/resources/protocol/amneziawg.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/luci-proto-amneziawg/htdocs/luci-static/resources/protocol/amneziawg.js b/luci-proto-amneziawg/htdocs/luci-static/resources/protocol/amneziawg.js index d432d8d..536cbf7 100644 --- a/luci-proto-amneziawg/htdocs/luci-static/resources/protocol/amneziawg.js +++ b/luci-proto-amneziawg/htdocs/luci-static/resources/protocol/amneziawg.js @@ -66,9 +66,9 @@ function generateDescription(name, texts) { } function buildSVGQRCode(data, code) { - // pixel size larger than 4 clips right and bottom edges of complex configs + // pixel size 3 for mobile browser const options = { - pixelSize: 4, + pixelSize: 3, whiteColor: 'white', blackColor: 'black' }; @@ -934,7 +934,7 @@ return network.registerProtocol('amneziawg', { }, [ E('div', { 'class': 'qr-code', - 'style': 'width:320px;flex:0 1 320px;text-align:center' + 'style': 'text-align:center' }, [ E('em', { 'class': 'spinning' }, [ _('Generating QR code…') ]) ]),