mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
paynym support added
This commit is contained in:
@@ -21,6 +21,7 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation
|
||||
'lightning_address' => ['nullable', 'string'],
|
||||
'lnurl' => ['nullable', 'string'],
|
||||
'nostr' => ['nullable', 'string'],
|
||||
'paynym' => ['nullable', 'string'],
|
||||
'node_id' => ['nullable', 'string', 'max:66'],
|
||||
'timezone' => ['required', 'string'],
|
||||
'email' => [
|
||||
@@ -44,6 +45,7 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation
|
||||
'lightning_address' => $input['lightning_address'],
|
||||
'lnurl' => $input['lnurl'],
|
||||
'nostr' => $input['nostr'],
|
||||
'paynym' => $input['paynym'],
|
||||
'node_id' => $input['node_id'],
|
||||
'email' => $input['email'],
|
||||
'timezone' => $input['timezone'],
|
||||
@@ -65,6 +67,7 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation
|
||||
'lnurl' => $input['lnurl'],
|
||||
'node_id' => $input['node_id'],
|
||||
'nostr' => $input['nostr'],
|
||||
'paynym' => $input['paynym'],
|
||||
'email' => $input['email'],
|
||||
'timezone' => $input['timezone'],
|
||||
'email_verified_at' => null,
|
||||
|
||||
@@ -32,6 +32,7 @@ class ContentCreatorForm extends Component
|
||||
'lecturer.active' => 'boolean',
|
||||
'lecturer.subtitle' => 'nullable|string',
|
||||
'lecturer.intro' => 'nullable|string',
|
||||
'lecturer.paynym' => 'nullable|string',
|
||||
'lecturer.nostr' => 'nullable|string',
|
||||
'lecturer.twitter_username' => 'nullable|string',
|
||||
'lecturer.website' => 'nullable|url',
|
||||
|
||||
@@ -26,6 +26,8 @@ class InternArticleView extends Component
|
||||
public bool $invoicePaid = false;
|
||||
public bool $alreadyPaid = false;
|
||||
|
||||
public ?string $payNymQrCode = '';
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->libraryItem->load([
|
||||
@@ -42,6 +44,22 @@ class InternArticleView extends Component
|
||||
->count() > 0) {
|
||||
$this->invoicePaid = true;
|
||||
}
|
||||
if ($this->libraryItem->lecturer->paynym) {
|
||||
$this->payNymQrCode = base64_encode(QrCode::format('png')
|
||||
->size(300)
|
||||
->merge($this->libraryItem->lecturer->getFirstMedia('avatar')
|
||||
? str(
|
||||
$this->libraryItem
|
||||
->lecturer
|
||||
->getFirstMediaPath('avatar'))
|
||||
->replace('/home/einundzwanzig/portal.einundzwanzig.space',
|
||||
''
|
||||
)
|
||||
: '/public/img/einundzwanzig.png',
|
||||
.3)
|
||||
->errorCorrection('H')
|
||||
->generate($this->libraryItem->lecturer->paynym));
|
||||
}
|
||||
}
|
||||
|
||||
public function pay()
|
||||
|
||||
@@ -75,11 +75,13 @@ class User extends Authenticatable implements MustVerifyEmail, CanComment, Ciphe
|
||||
->addField('lnurl')
|
||||
->addField('node_id')
|
||||
->addField('email')
|
||||
->addField('paynym')
|
||||
->addJsonField('lnbits', $map)
|
||||
->addBlindIndex('public_key', new BlindIndex('public_key_index'))
|
||||
->addBlindIndex('lightning_address', new BlindIndex('lightning_address_index'))
|
||||
->addBlindIndex('lnurl', new BlindIndex('lnurl_index'))
|
||||
->addBlindIndex('node_id', new BlindIndex('node_id_index'))
|
||||
->addBlindIndex('paynym', new BlindIndex('paynym_index'))
|
||||
->addBlindIndex('email', new BlindIndex('email_index'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user