🖼️ Fix QR overlay image path in lnurl-auth flow and ensure compatibility with localized and default images

This commit is contained in:
HolgerHatGarKeineNode
2025-12-02 20:41:27 +01:00
parent aedff4e2f5
commit 14dfc3fff7

View File

@@ -52,15 +52,14 @@ 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';
$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';
$image = 'public/img/domains/de-DE.jpg';
}
$this->qrCode = base64_encode(QrCode::format('png')
->size(300)
->merge($image, .3)
->merge('/'.$image, .3)
->errorCorrection('H')
->generate($this->lnurl));
}