diff --git a/VERSION b/VERSION index c04c650..db6fb4a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.7 +1.2.8 diff --git a/app.py b/app.py index b4cafac..ae35af5 100644 --- a/app.py +++ b/app.py @@ -764,8 +764,13 @@ def _pad_conf_with_none(conf): def qr_datauri(data): try: import qrcode, io, base64 + qr = qrcode.QRCode(error_correction=qrcode.constants.ERROR_CORRECT_L, + box_size=4, border=3) + qr.add_data(data) + qr.make(fit=True) + img = qr.make_image(fill_color="black", back_color="white") buf = io.BytesIO() - qrcode.make(data).save(buf, format="PNG") + img.save(buf, format="PNG") return "data:image/png;base64," + base64.b64encode(buf.getvalue()).decode() except Exception: return "" @@ -1689,7 +1694,7 @@ def client_phone(cid, mode): {nav('clients')}
{tr("Отсканируй QR в приложении или импортируй конфиг:", "Scan the QR in the app or import the config:")}
{extra}