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'],
|
'lightning_address' => ['nullable', 'string'],
|
||||||
'lnurl' => ['nullable', 'string'],
|
'lnurl' => ['nullable', 'string'],
|
||||||
'nostr' => ['nullable', 'string'],
|
'nostr' => ['nullable', 'string'],
|
||||||
|
'paynym' => ['nullable', 'string'],
|
||||||
'node_id' => ['nullable', 'string', 'max:66'],
|
'node_id' => ['nullable', 'string', 'max:66'],
|
||||||
'timezone' => ['required', 'string'],
|
'timezone' => ['required', 'string'],
|
||||||
'email' => [
|
'email' => [
|
||||||
@@ -44,6 +45,7 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation
|
|||||||
'lightning_address' => $input['lightning_address'],
|
'lightning_address' => $input['lightning_address'],
|
||||||
'lnurl' => $input['lnurl'],
|
'lnurl' => $input['lnurl'],
|
||||||
'nostr' => $input['nostr'],
|
'nostr' => $input['nostr'],
|
||||||
|
'paynym' => $input['paynym'],
|
||||||
'node_id' => $input['node_id'],
|
'node_id' => $input['node_id'],
|
||||||
'email' => $input['email'],
|
'email' => $input['email'],
|
||||||
'timezone' => $input['timezone'],
|
'timezone' => $input['timezone'],
|
||||||
@@ -65,6 +67,7 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation
|
|||||||
'lnurl' => $input['lnurl'],
|
'lnurl' => $input['lnurl'],
|
||||||
'node_id' => $input['node_id'],
|
'node_id' => $input['node_id'],
|
||||||
'nostr' => $input['nostr'],
|
'nostr' => $input['nostr'],
|
||||||
|
'paynym' => $input['paynym'],
|
||||||
'email' => $input['email'],
|
'email' => $input['email'],
|
||||||
'timezone' => $input['timezone'],
|
'timezone' => $input['timezone'],
|
||||||
'email_verified_at' => null,
|
'email_verified_at' => null,
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class ContentCreatorForm extends Component
|
|||||||
'lecturer.active' => 'boolean',
|
'lecturer.active' => 'boolean',
|
||||||
'lecturer.subtitle' => 'nullable|string',
|
'lecturer.subtitle' => 'nullable|string',
|
||||||
'lecturer.intro' => 'nullable|string',
|
'lecturer.intro' => 'nullable|string',
|
||||||
|
'lecturer.paynym' => 'nullable|string',
|
||||||
'lecturer.nostr' => 'nullable|string',
|
'lecturer.nostr' => 'nullable|string',
|
||||||
'lecturer.twitter_username' => 'nullable|string',
|
'lecturer.twitter_username' => 'nullable|string',
|
||||||
'lecturer.website' => 'nullable|url',
|
'lecturer.website' => 'nullable|url',
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ class InternArticleView extends Component
|
|||||||
public bool $invoicePaid = false;
|
public bool $invoicePaid = false;
|
||||||
public bool $alreadyPaid = false;
|
public bool $alreadyPaid = false;
|
||||||
|
|
||||||
|
public ?string $payNymQrCode = '';
|
||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
$this->libraryItem->load([
|
$this->libraryItem->load([
|
||||||
@@ -42,6 +44,22 @@ class InternArticleView extends Component
|
|||||||
->count() > 0) {
|
->count() > 0) {
|
||||||
$this->invoicePaid = true;
|
$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()
|
public function pay()
|
||||||
|
|||||||
@@ -75,11 +75,13 @@ class User extends Authenticatable implements MustVerifyEmail, CanComment, Ciphe
|
|||||||
->addField('lnurl')
|
->addField('lnurl')
|
||||||
->addField('node_id')
|
->addField('node_id')
|
||||||
->addField('email')
|
->addField('email')
|
||||||
|
->addField('paynym')
|
||||||
->addJsonField('lnbits', $map)
|
->addJsonField('lnbits', $map)
|
||||||
->addBlindIndex('public_key', new BlindIndex('public_key_index'))
|
->addBlindIndex('public_key', new BlindIndex('public_key_index'))
|
||||||
->addBlindIndex('lightning_address', new BlindIndex('lightning_address_index'))
|
->addBlindIndex('lightning_address', new BlindIndex('lightning_address_index'))
|
||||||
->addBlindIndex('lnurl', new BlindIndex('lnurl_index'))
|
->addBlindIndex('lnurl', new BlindIndex('lnurl_index'))
|
||||||
->addBlindIndex('node_id', new BlindIndex('node_id_index'))
|
->addBlindIndex('node_id', new BlindIndex('node_id_index'))
|
||||||
|
->addBlindIndex('paynym', new BlindIndex('paynym_index'))
|
||||||
->addBlindIndex('email', new BlindIndex('email_index'));
|
->addBlindIndex('email', new BlindIndex('email_index'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration {
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->text('paynym')
|
||||||
|
->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
//
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration {
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('lecturers', function (Blueprint $table) {
|
||||||
|
$table->text('paynym')
|
||||||
|
->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('lecturers', function (Blueprint $table) {
|
||||||
|
//
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -857,5 +857,8 @@
|
|||||||
"articles": "Artikel",
|
"articles": "Artikel",
|
||||||
"Participation confirmed": "Teilnahme bestätigt",
|
"Participation confirmed": "Teilnahme bestätigt",
|
||||||
"There was an error on row :row. :message": "Es gab einen Fehler in Zeile :row. :message",
|
"There was an error on row :row. :message": "Es gab einen Fehler in Zeile :row. :message",
|
||||||
"Calendar Stream-Url for my meetups only": "Kalender-Stream-Url nur für meine Meetups"
|
"Calendar Stream-Url for my meetups only": "Kalender-Stream-Url nur für meine Meetups",
|
||||||
|
"Avatar\/Picture": "Avatar\/Bild",
|
||||||
|
"PayNym": "",
|
||||||
|
"starts with PM...": "startet mit PM..."
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -857,5 +857,8 @@
|
|||||||
"Perhabs": "",
|
"Perhabs": "",
|
||||||
"There was an error on row :row. :message": "",
|
"There was an error on row :row. :message": "",
|
||||||
"Calendar Stream-Url for my meetups only": "",
|
"Calendar Stream-Url for my meetups only": "",
|
||||||
"Calendar Stream-Url for my meetups": ""
|
"Calendar Stream-Url for my meetups": "",
|
||||||
|
"Avatar\/Picture": "",
|
||||||
|
"PayNym": "",
|
||||||
|
"starts with PM...": ""
|
||||||
}
|
}
|
||||||
@@ -857,5 +857,8 @@
|
|||||||
"Perhabs": "",
|
"Perhabs": "",
|
||||||
"There was an error on row :row. :message": "",
|
"There was an error on row :row. :message": "",
|
||||||
"Calendar Stream-Url for my meetups only": "",
|
"Calendar Stream-Url for my meetups only": "",
|
||||||
"Calendar Stream-Url for my meetups": ""
|
"Calendar Stream-Url for my meetups": "",
|
||||||
|
"Avatar\/Picture": "",
|
||||||
|
"PayNym": "",
|
||||||
|
"starts with PM...": ""
|
||||||
}
|
}
|
||||||
@@ -858,5 +858,8 @@
|
|||||||
"Perhabs": "",
|
"Perhabs": "",
|
||||||
"There was an error on row :row. :message": "",
|
"There was an error on row :row. :message": "",
|
||||||
"Calendar Stream-Url for my meetups only": "",
|
"Calendar Stream-Url for my meetups only": "",
|
||||||
"Calendar Stream-Url for my meetups": ""
|
"Calendar Stream-Url for my meetups": "",
|
||||||
|
"Avatar\/Picture": "",
|
||||||
|
"PayNym": "",
|
||||||
|
"starts with PM...": ""
|
||||||
}
|
}
|
||||||
@@ -858,5 +858,8 @@
|
|||||||
"Perhabs": "",
|
"Perhabs": "",
|
||||||
"There was an error on row :row. :message": "",
|
"There was an error on row :row. :message": "",
|
||||||
"Calendar Stream-Url for my meetups only": "",
|
"Calendar Stream-Url for my meetups only": "",
|
||||||
"Calendar Stream-Url for my meetups": ""
|
"Calendar Stream-Url for my meetups": "",
|
||||||
|
"Avatar\/Picture": "",
|
||||||
|
"PayNym": "",
|
||||||
|
"starts with PM...": ""
|
||||||
}
|
}
|
||||||
@@ -858,5 +858,8 @@
|
|||||||
"Perhabs": "",
|
"Perhabs": "",
|
||||||
"There was an error on row :row. :message": "",
|
"There was an error on row :row. :message": "",
|
||||||
"Calendar Stream-Url for my meetups only": "",
|
"Calendar Stream-Url for my meetups only": "",
|
||||||
"Calendar Stream-Url for my meetups": ""
|
"Calendar Stream-Url for my meetups": "",
|
||||||
|
"Avatar\/Picture": "",
|
||||||
|
"PayNym": "",
|
||||||
|
"starts with PM...": ""
|
||||||
}
|
}
|
||||||
@@ -858,5 +858,8 @@
|
|||||||
"Perhabs": "",
|
"Perhabs": "",
|
||||||
"There was an error on row :row. :message": "",
|
"There was an error on row :row. :message": "",
|
||||||
"Calendar Stream-Url for my meetups only": "",
|
"Calendar Stream-Url for my meetups only": "",
|
||||||
"Calendar Stream-Url for my meetups": ""
|
"Calendar Stream-Url for my meetups": "",
|
||||||
|
"Avatar\/Picture": "",
|
||||||
|
"PayNym": "",
|
||||||
|
"starts with PM...": ""
|
||||||
}
|
}
|
||||||
@@ -858,5 +858,8 @@
|
|||||||
"Perhabs": "",
|
"Perhabs": "",
|
||||||
"There was an error on row :row. :message": "",
|
"There was an error on row :row. :message": "",
|
||||||
"Calendar Stream-Url for my meetups only": "",
|
"Calendar Stream-Url for my meetups only": "",
|
||||||
"Calendar Stream-Url for my meetups": ""
|
"Calendar Stream-Url for my meetups": "",
|
||||||
|
"Avatar\/Picture": "",
|
||||||
|
"PayNym": "",
|
||||||
|
"starts with PM...": ""
|
||||||
}
|
}
|
||||||
@@ -858,5 +858,8 @@
|
|||||||
"Perhabs": "",
|
"Perhabs": "",
|
||||||
"There was an error on row :row. :message": "",
|
"There was an error on row :row. :message": "",
|
||||||
"Calendar Stream-Url for my meetups only": "",
|
"Calendar Stream-Url for my meetups only": "",
|
||||||
"Calendar Stream-Url for my meetups": ""
|
"Calendar Stream-Url for my meetups": "",
|
||||||
|
"Avatar\/Picture": "",
|
||||||
|
"PayNym": "",
|
||||||
|
"starts with PM...": ""
|
||||||
}
|
}
|
||||||
@@ -820,5 +820,8 @@
|
|||||||
"Perhabs": "",
|
"Perhabs": "",
|
||||||
"There was an error on row :row. :message": "",
|
"There was an error on row :row. :message": "",
|
||||||
"Calendar Stream-Url for my meetups only": "",
|
"Calendar Stream-Url for my meetups only": "",
|
||||||
"Calendar Stream-Url for my meetups": ""
|
"Calendar Stream-Url for my meetups": "",
|
||||||
|
"Avatar\/Picture": "",
|
||||||
|
"PayNym": "",
|
||||||
|
"starts with PM...": ""
|
||||||
}
|
}
|
||||||
@@ -832,5 +832,8 @@
|
|||||||
"Perhabs": "",
|
"Perhabs": "",
|
||||||
"There was an error on row :row. :message": "",
|
"There was an error on row :row. :message": "",
|
||||||
"Calendar Stream-Url for my meetups only": "",
|
"Calendar Stream-Url for my meetups only": "",
|
||||||
"Calendar Stream-Url for my meetups": ""
|
"Calendar Stream-Url for my meetups": "",
|
||||||
|
"Avatar\/Picture": "",
|
||||||
|
"PayNym": "",
|
||||||
|
"starts with PM...": ""
|
||||||
}
|
}
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<div class="space-y-8 divide-y divide-gray-700 sm:space-y-5">
|
<div class="space-y-8 divide-y divide-gray-700 sm:space-y-5">
|
||||||
<div class="mt-6 sm:mt-5 space-y-6 sm:space-y-5">
|
<div class="mt-6 sm:mt-5 space-y-6 sm:space-y-5">
|
||||||
|
|
||||||
<x-input.group :for=" md5('image')" :label="__('Main picture')">
|
<x-input.group :for=" md5('image')" :label="__('Avatar/Picture')">
|
||||||
<div class="py-4">
|
<div class="py-4">
|
||||||
@if ($image)
|
@if ($image)
|
||||||
<div class="text-gray-200">{{ __('Preview') }}:</div>
|
<div class="text-gray-200">{{ __('Preview') }}:</div>
|
||||||
@@ -69,6 +69,11 @@
|
|||||||
:placeholder="__('Website')"/>
|
:placeholder="__('Website')"/>
|
||||||
</x-input.group>
|
</x-input.group>
|
||||||
|
|
||||||
|
<x-input.group :for="md5('lecturer.paynym')" :label="__('PayNym')">
|
||||||
|
<x-input autocomplete="off" wire:model.debounce="lecturer.paynym"
|
||||||
|
:placeholder="__('PayNym')" :hint="__('starts with PM...')"/>
|
||||||
|
</x-input.group>
|
||||||
|
|
||||||
<x-input.group :for="md5('lecturer.lightning_address')" :label="__('Lightning Address')">
|
<x-input.group :for="md5('lecturer.lightning_address')" :label="__('Lightning Address')">
|
||||||
<x-input autocomplete="off" wire:model.debounce="lecturer.lightning_address"
|
<x-input autocomplete="off" wire:model.debounce="lecturer.lightning_address"
|
||||||
:placeholder="__('Lightning Address')" :hint="__('for example xy@getalby.com')"/>
|
:placeholder="__('Lightning Address')" :hint="__('for example xy@getalby.com')"/>
|
||||||
|
|||||||
@@ -264,6 +264,13 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@if($payNymQrCode)
|
||||||
|
<div class="flex flex-col sm:flex-row justify-center space-x-4 border-t border-white py-4 mt-4">
|
||||||
|
<h1 class="text-2xl text-gray-200">PayNym</h1>
|
||||||
|
<img src="{{ 'data:image/png;base64, '. $payNymQrCode }}" alt="qrcode">
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
<div wire:ignore>
|
<div wire:ignore>
|
||||||
<div class="flex flex-col sm:flex-row justify-center space-x-4 border-t border-white py-4 mt-4">
|
<div class="flex flex-col sm:flex-row justify-center space-x-4 border-t border-white py-4 mt-4">
|
||||||
@if($libraryItem->lecturer->lightning_address || $libraryItem->lecturer->lnurl || $libraryItem->lecturer->node_id)
|
@if($libraryItem->lecturer->lightning_address || $libraryItem->lecturer->lnurl || $libraryItem->lecturer->node_id)
|
||||||
|
|||||||
@@ -73,6 +73,16 @@
|
|||||||
<x-jet-input-error for="nostr" class="mt-2"/>
|
<x-jet-input-error for="nostr" class="mt-2"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- paynym -->
|
||||||
|
<div class="col-span-6 sm:col-span-4">
|
||||||
|
<x-jet-label for="paynym" value="{{ __('PayNym') }}"/>
|
||||||
|
<x-jet-input id="paynym" type="text" class="mt-1 block w-full"
|
||||||
|
wire:model.defer="state.paynym"
|
||||||
|
autocomplete="paynym"/>
|
||||||
|
<p class="text-xs">{{ __('starts with PM...') }}</p>
|
||||||
|
<x-jet-input-error for="paynym" class="mt-2"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- lightning_address -->
|
<!-- lightning_address -->
|
||||||
<div class="col-span-6 sm:col-span-4">
|
<div class="col-span-6 sm:col-span-4">
|
||||||
<x-jet-label for="lightning_address" value="{{ __('Lightning Address') }}"/>
|
<x-jet-label for="lightning_address" value="{{ __('Lightning Address') }}"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user