fix: white background for QR codes in dark mode
All checks were successful
CI / test (push) Successful in 2m3s
CI / release (push) Successful in 35s
CI / docker (push) Successful in 55s

This commit is contained in:
Stefano Bertelli 2026-03-30 23:14:57 -05:00
parent 41a62832f7
commit 44c20cb66b
2 changed files with 2 additions and 2 deletions

View file

@ -352,7 +352,7 @@ def _show_config_dialog(device_name: str, config_text: str):
qr = qrcode.make(config_text, image_factory=qrcode.image.svg.SvgPathImage) qr = qrcode.make(config_text, image_factory=qrcode.image.svg.SvgPathImage)
buf = io.BytesIO() buf = io.BytesIO()
qr.save(buf) qr.save(buf)
ui.html(buf.getvalue().decode()).classes("w-full q-mt-sm") ui.html(buf.getvalue().decode()).classes("w-full q-mt-sm").style("background: white; padding: 8px; border-radius: 8px")
except Exception: except Exception:
pass pass
ui.button("Download .conf", on_click=lambda: ui.download(config_text.encode(), f"{device_name}.conf")).props("color=primary unelevated").classes("w-full q-mt-sm") ui.button("Download .conf", on_click=lambda: ui.download(config_text.encode(), f"{device_name}.conf")).props("color=primary unelevated").classes("w-full q-mt-sm")

View file

@ -459,7 +459,7 @@ def _show_config_dialog(device_name: str, config_text: str):
qr = qrcode.make(config_text, image_factory=qrcode.image.svg.SvgPathImage) qr = qrcode.make(config_text, image_factory=qrcode.image.svg.SvgPathImage)
buf = io.BytesIO() buf = io.BytesIO()
qr.save(buf) qr.save(buf)
ui.html(buf.getvalue().decode()).classes("w-full q-mt-sm") ui.html(buf.getvalue().decode()).classes("w-full q-mt-sm").style("background: white; padding: 8px; border-radius: 8px")
except Exception: except Exception:
ui.label("QR code generation failed").classes("text-caption text-grey") ui.label("QR code generation failed").classes("text-caption text-grey")