From 6baa58260ab841088c3c721a01fb0319825a28f8 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sun, 20 Nov 2022 04:51:18 +1100 Subject: [PATCH] 2fa qrcode fixes (#2407) * 2fa qrcode fixes - add light background to qr code when using dark theme - show OTP secret code under qr code for manual entry on apps if required fixes #2386 fixes #2389 * fix code formatting * revert changes re visible code This conflicts with an existing PR. * i code pretty --- bookwyrm/static/css/themes/bookwyrm-dark.scss | 4 ++++ bookwyrm/templates/preferences/2fa.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bookwyrm/static/css/themes/bookwyrm-dark.scss b/bookwyrm/static/css/themes/bookwyrm-dark.scss index a2eb94efb..b98422688 100644 --- a/bookwyrm/static/css/themes/bookwyrm-dark.scss +++ b/bookwyrm/static/css/themes/bookwyrm-dark.scss @@ -92,6 +92,10 @@ $family-secondary: $family-sans-serif; color: $grey-light !important; } +#qrcode svg { + background-color: #a6a6a6; +} + @import "../bookwyrm.scss"; @import "../vendor/icons.css"; @import "../vendor/shepherd.scss"; diff --git a/bookwyrm/templates/preferences/2fa.html b/bookwyrm/templates/preferences/2fa.html index b0703bc4a..29a011380 100644 --- a/bookwyrm/templates/preferences/2fa.html +++ b/bookwyrm/templates/preferences/2fa.html @@ -45,7 +45,7 @@

{% trans "Scan the QR code with your authentication app and then enter the code from your app below to confirm your app is set up." %}

-
{{ qrcode | safe }}
+
{{ qrcode | safe }}
{{ form.otp }}