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.
This commit is contained in:
borisovmsw
2026-01-13 13:45:47 +03:00
committed by GitHub
parent 9591ffdebe
commit 449988b8e6

View File

@@ -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…') ])
]),