mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2025-12-13 23:56:47 +00:00
🖼️ Fix QR overlay image path in lnurl-auth flow and ensure compatibility with localized and default images
This commit is contained in:
@@ -52,15 +52,14 @@ class extends Component {
|
|||||||
$this->url = url('/api/lnurl-auth-callback?tag=login&k1='.$this->k1.'&action=login');
|
$this->url = url('/api/lnurl-auth-callback?tag=login&k1='.$this->k1.'&action=login');
|
||||||
}
|
}
|
||||||
$this->lnurl = lnurl\encodeUrl($this->url);
|
$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);
|
$checkIfFileExists = base_path($image);
|
||||||
if (!file_exists($checkIfFileExists)) {
|
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')
|
$this->qrCode = base64_encode(QrCode::format('png')
|
||||||
->size(300)
|
->size(300)
|
||||||
->merge($image, .3)
|
->merge('/'.$image, .3)
|
||||||
->errorCorrection('H')
|
->errorCorrection('H')
|
||||||
->generate($this->lnurl));
|
->generate($this->lnurl));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user