diff --git a/app/Actions/Fortify/UpdateUserProfileInformation.php b/app/Actions/Fortify/UpdateUserProfileInformation.php index c6e4a7ad..3de77de8 100644 --- a/app/Actions/Fortify/UpdateUserProfileInformation.php +++ b/app/Actions/Fortify/UpdateUserProfileInformation.php @@ -20,13 +20,16 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation public function update($user, array $input) { Validator::make($input, [ - 'name' => ['required', 'string', 'max:255'], - 'timezone' => ['required', 'string'], - 'email' => [ + 'name' => ['required', 'string', 'max:255'], + 'lightning_address' => ['nullable', 'string'], + 'lnurl' => ['nullable', 'string'], + 'node_id' => ['nullable', 'string'], + 'timezone' => ['required', 'string'], + 'email' => [ 'nullable', 'email', 'max:255', Rule::unique('users') ->ignore($user->id) ], - 'photo' => ['nullable', 'mimes:jpg,jpeg,png', 'max:1024'], + 'photo' => ['nullable', 'mimes:jpg,jpeg,png', 'max:1024'], ]) ->validateWithBag('updateProfileInformation'); @@ -39,9 +42,12 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation $this->updateVerifiedUser($user, $input); } else { $user->forceFill([ - 'name' => $input['name'], - 'email' => $input['email'], - 'timezone' => $input['timezone'], + 'name' => $input['name'], + 'lightning_address' => $input['lightning_address'], + 'lnurl' => $input['lnurl'], + 'node_id' => $input['node_id'], + 'email' => $input['email'], + 'timezone' => $input['timezone'], ]) ->save(); } @@ -59,6 +65,9 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation { $user->forceFill([ 'name' => $input['name'], + 'lightning_address' => $input['lightning_address'], + 'lnurl' => $input['lnurl'], + 'node_id' => $input['node_id'], 'email' => $input['email'], 'timezone' => $input['timezone'], 'email_verified_at' => null, diff --git a/database/migrations/2023_01_18_142300_add_ln_addresses_to_users_table.php b/database/migrations/2023_01_18_142300_add_ln_addresses_to_users_table.php new file mode 100644 index 00000000..3beef5cf --- /dev/null +++ b/database/migrations/2023_01_18_142300_add_ln_addresses_to_users_table.php @@ -0,0 +1,34 @@ +string('lightning_address') + ->nullable(); + $table->text('lnurl') + ->nullable(); + $table->string('node_id') + ->nullable(); + }); + } + + /** + * Reverse the migrations. + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + // + }); + } +}; diff --git a/resources/views/livewire/book-case/highscore-table.blade.php b/resources/views/livewire/book-case/highscore-table.blade.php index 1541b00e..1ca1ecb2 100644 --- a/resources/views/livewire/book-case/highscore-table.blade.php +++ b/resources/views/livewire/book-case/highscore-table.blade.php @@ -17,12 +17,43 @@ + + @if($modal) diff --git a/resources/views/livewire/frontend/header.blade.php b/resources/views/livewire/frontend/header.blade.php index a0dafbef..f6cb1a78 100644 --- a/resources/views/livewire/frontend/header.blade.php +++ b/resources/views/livewire/frontend/header.blade.php @@ -59,10 +59,6 @@ class="{{ request()->routeIs('bookCases.table.bookcases') ? 'text-amber-500 underline' : 'text-gray-400' }} mr-5 font-medium leading-6 hover:text-gray-300"> {{ __('Bookcases') }} - - {{ __('Highscore Table') }} - {{ __('Submit new book case') }} @@ -88,6 +84,10 @@ {{ __('Events') }} @endif + + {{ __('Highscore Table') }} + diff --git a/resources/views/profile/update-profile-information-form.blade.php b/resources/views/profile/update-profile-information-form.blade.php index 87e9bd78..483626a4 100644 --- a/resources/views/profile/update-profile-information-form.blade.php +++ b/resources/views/profile/update-profile-information-form.blade.php @@ -61,6 +61,30 @@ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ {{--