From aedff4e2f56a5e6889bdeb7b9c5ab35f09eafc61 Mon Sep 17 00:00:00 2001 From: HolgerHatGarKeineNode Date: Tue, 2 Dec 2025 20:40:07 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=96=BC=EF=B8=8F=20Fallback=20to=20default?= =?UTF-8?q?=20QR=20overlay=20image=20if=20localized=20version=20is=20unava?= =?UTF-8?q?ilable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/livewire/auth/login.blade.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/views/livewire/auth/login.blade.php b/resources/views/livewire/auth/login.blade.php index f754918..2913ddc 100644 --- a/resources/views/livewire/auth/login.blade.php +++ b/resources/views/livewire/auth/login.blade.php @@ -52,9 +52,15 @@ class extends Component { $this->url = url('/api/lnurl-auth-callback?tag=login&k1='.$this->k1.'&action=login'); } $this->lnurl = lnurl\encodeUrl($this->url); + $image = '/public/img/domains/'.session('lang_country', 'de-DE').'.jpg'; + $checkIfFileExists = base_path($image); + if (!file_exists($checkIfFileExists)) { + $checkIfFileExists = base_path('/public/img/domains/de-DE.jpg'); + $image = '/public/img/domains/de-DE.jpg'; + } $this->qrCode = base64_encode(QrCode::format('png') ->size(300) - ->merge('/public/img/domains/'.session('lang_country', 'de-DE').'.jpg', .3) + ->merge($image, .3) ->errorCorrection('H') ->generate($this->lnurl)); }