Skip to content

Commit 02c401a

Browse files
duncanmccleanclaudejasonvarga
authored
[6.x] Add padding around 2FA QR code for dark mode scanning (#14460)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Jason Varga <jason@pixelfear.com>
1 parent 5ba8ea7 commit 02c401a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

resources/js/components/two-factor/Setup.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ watch(setupModalOpen, (open) => {
6767
<ui-description class="mb-6">{{ __('statamic::messages.two_factor_setup_instructions') }}</ui-description>
6868

6969
<div class="flex space-x-6">
70-
<div class="bg-white" v-html="qrCode"></div>
70+
<div class="shrink-0 rounded-md border border-gray-200 dark:border-none overflow-hidden" v-html="qrCode"></div>
7171
<div class="space-y-6 w-full">
7272
<ui-field :label="__('Setup Key')">
7373
<ui-input copyable readonly :model-value="secretKey" />

src/Auth/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ public function twoFactorQrCodeSvg(): string
430430
{
431431
$svg = (new Writer(
432432
new ImageRenderer(
433-
new RendererStyle(192, 0, null, null, Fill::uniformColor(new Rgb(255, 255, 255), new Rgb(45, 55, 72))),
433+
new RendererStyle(size: 192, fill: Fill::uniformColor(new Rgb(255, 255, 255), new Rgb(45, 55, 72))),
434434
new SvgImageBackEnd
435435
)
436436
))->writeString($this->twoFactorQrCodeUrl());

0 commit comments

Comments
 (0)