mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-11-29 17:37:52 +01:00
fix: local QR code
This commit is contained in:
1 parent
a5e49a53c0
commit
4d30946d2f
1 file changed
+5
-5
@@ -7,6 +7,7 @@ import { disable2FA, enable2FA, get2FAStatus, regenerateBackupCodes, start2FASet
|
|||||||
import { Button } from "src/components";
|
import { Button } from "src/components";
|
||||||
import { T } from "src/locale";
|
import { T } from "src/locale";
|
||||||
import { validateString } from "src/modules/Validations";
|
import { validateString } from "src/modules/Validations";
|
||||||
|
import QRCode from "react-qr-code";
|
||||||
|
|
||||||
type Step = "loading" | "status" | "setup" | "verify" | "backup" | "disable";
|
type Step = "loading" | "status" | "setup" | "verify" | "backup" | "disable";
|
||||||
|
|
||||||
@@ -155,11 +156,10 @@ const TwoFactorModal = EasyModal.create(({ id, visible, remove }: Props) => {
|
|||||||
<T id="2fa.setup-instructions" />
|
<T id="2fa.setup-instructions" />
|
||||||
</p>
|
</p>
|
||||||
<div className="text-center mb-3">
|
<div className="text-center mb-3">
|
||||||
<img
|
<QRCode
|
||||||
src={`https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(setupData.otpauthUrl)}`}
|
value={setupData.otpauthUrl}
|
||||||
alt="QR Code"
|
size={200}
|
||||||
className="img-fluid"
|
style={{ maxWidth: "200px", height: "auto" }}
|
||||||
style={{ maxWidth: "200px" }}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<label className="mb-3 d-block">
|
<label className="mb-3 d-block">
|
||||||
|
|||||||
Reference in new issue
Block a user