mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
fix(web): add white padding around qrcode image (#2081)
* fix(web): add white padding around qrcode image Some qrcode readers are struggling to decode the qrcode because there is no clear border between the qrcode image and the page background in dark mode. This fix add a white padding so that the border is now obvious. Fixes #1777.
This commit is contained in:
parent
6de4f9ea61
commit
7b1f186753
|
@ -20,7 +20,6 @@ const RegisterOneTimePassword = function () {
|
|||
const style = useStyles();
|
||||
const history = useHistory();
|
||||
const location = useLocation();
|
||||
|
||||
// The secret retrieved from the API is all is ok.
|
||||
const [secretURL, setSecretURL] = useState("empty");
|
||||
const [secretBase32, setSecretBase32] = useState(undefined as string | undefined);
|
||||
|
@ -86,9 +85,9 @@ const RegisterOneTimePassword = function () {
|
|||
appleStoreLink={GoogleAuthenticator.appleStore}
|
||||
/>
|
||||
</div>
|
||||
<div className={style.qrcodeContainer}>
|
||||
<div className={classnames(qrcodeFuzzyStyle, style.qrcodeContainer)}>
|
||||
<Link href={secretURL}>
|
||||
<QRCode value={secretURL} className={classnames(qrcodeFuzzyStyle, style.qrcode)} size={256} />
|
||||
<QRCode value={secretURL} className={style.qrcode} size={256} />
|
||||
{!hasErrored && isLoading ? <CircularProgress className={style.loader} size={128} /> : null}
|
||||
{hasErrored ? <FontAwesomeIcon className={style.failureIcon} icon={faTimesCircle} /> : null}
|
||||
</Link>
|
||||
|
@ -132,6 +131,8 @@ const useStyles = makeStyles((theme) => ({
|
|||
qrcode: {
|
||||
marginTop: theme.spacing(2),
|
||||
marginBottom: theme.spacing(2),
|
||||
padding: theme.spacing(),
|
||||
backgroundColor: "white",
|
||||
},
|
||||
fuzzy: {
|
||||
filter: "blur(10px)",
|
||||
|
|
Loading…
Reference in New Issue
Block a user