🚀 Add Nostr profile job, Hungarian translations, and Horizon integration

- Introduced `FetchNostrProfileJob` for retrieving and updating user Nostr profiles.
- Added Hungarian translations (`auth.php`, `passwords.php`, `validation.php`, and others) for improved localization.
- Integrated Laravel Horizon for enhanced queue management (`HorizonServiceProvider` added, `composer.json` updated).
- Updated German and Spanish language files to fix duplicate keys.
- Minor route addition for testing Nostr profile job dispatch.
This commit is contained in:
HolgerHatGarKeineNode
2025-11-24 00:38:37 +01:00
parent bf14c1d89c
commit 8c1923f826
18 changed files with 1836 additions and 384 deletions

View File

@@ -1,6 +1,7 @@
<?php
use App\Attributes\SeoDataAttribute;
use App\Jobs\FetchNostrProfileJob;
use App\Models\LoginKey;
use App\Models\User;
use App\Notifications\ModelCreatedNotification;
@@ -63,17 +64,7 @@ class extends Component {
public function loginListener($pubkey): void
{
$user = \App\Models\User::query()->where('nostr', $pubkey)->first();
if ($user) {
Auth::loginUsingId($user->id);
Session::regenerate();
$this->redirectIntended(
default: route('dashboard',
['country' => str(session('lang_country', config('app.domain_country')))->after('-')->lower()],
absolute: false),
navigate: true,
);
return;
} else {
if (!$user) {
$fakeName = str()->random(10);
// create User
$user = User::create([
@@ -88,16 +79,16 @@ class extends Component {
'wallet_id' => null,
],
]);
Auth::loginUsingId($user->id);
Session::regenerate();
$this->redirectIntended(
default: route('dashboard',
['country' => str(session('lang_country', config('app.domain_country')))->after('-')->lower()],
absolute: false),
navigate: true,
);
return;
}
FetchNostrProfileJob::dispatch($user);
Auth::loginUsingId($user->id);
Session::regenerate();
$this->redirectIntended(
default: route('dashboard',
['country' => str(session('lang_country', config('app.domain_country')))->after('-')->lower()],
absolute: false),
navigate: true,
);
return;
$this->validate();