mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2025-12-17 12:54:22 +00:00
🚀 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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user