fix(WeComAuth): Optimise QR code margin styles

This commit is contained in:
haitaoo 2023-04-20 16:11:46 +08:00
parent d3f02a35d9
commit 128d5c9f87
1 changed files with 9 additions and 4 deletions

View File

@ -35,7 +35,7 @@ const Index: FC = () => {
if (!targetUrl) {
return;
}
QrCode.toDataURL(targetUrl, { width: 240 }, (err, url) => {
QrCode.toDataURL(targetUrl, { width: 240, margin: 0 }, (err, url) => {
if (err) {
return;
}
@ -67,13 +67,18 @@ const Index: FC = () => {
return (
<Card className="text-center">
<Card.Body>
<Card.Title as="h3">
<Card.Title as="h3" className="mb-3">
{agentName} {t('login')}
</Card.Title>
{qrcodeDataUrl ? (
<>
<img width={240} height={240} src={qrcodeDataUrl} alt="" />
<div className="text-secondary">
<img
width={240}
height={240}
src={qrcodeDataUrl}
alt={agentName}
/>
<div className="text-secondary mt-3">
{t('qrcode_login_tip', { agentName })}
</div>
</>