Skip to content

Commit 44b9bf2

Browse files
committed
chore: Apply rebase develop
1 parent f36996f commit 44b9bf2

File tree

5 files changed

+2
-289
lines changed

5 files changed

+2
-289
lines changed

app/Livewire/Forms/LoginForm.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ public function __construct(Component $component = null, string $name = 'form')
2222
parent::__construct($component, $name);
2323
}
2424

25-
/**
26-
* Attempt to authenticate the request's credentials.
27-
*
28-
* @throws \Illuminate\Validation\ValidationException
29-
*/
3025
public function authenticate(): void
3126
{
3227
$this->ensureIsNotRateLimited();
@@ -42,9 +37,6 @@ public function authenticate(): void
4237
RateLimiter::clear($this->throttleKey());
4338
}
4439

45-
/**
46-
* Ensure the authentication request is not rate limited.
47-
*/
4840
protected function ensureIsNotRateLimited(): void
4941
{
5042
if (!RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
@@ -63,9 +55,6 @@ protected function ensureIsNotRateLimited(): void
6355
]);
6456
}
6557

66-
/**
67-
* Get the authentication rate limiting throttle key.
68-
*/
6958
protected function throttleKey(): string
7059
{
7160
return Str::transliterate(Str::lower($this->email) . '|' . request()->ip());

app/Livewire/Pages/Auth/Login.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use Livewire\Attributes\Layout;
1111
use Livewire\Component;
1212

13-
// #[Layout('layouts.guest')]
1413
final class Login extends Component
1514
{
1615
public LoginForm $form;

app/Providers/VoltServiceProvider.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,11 @@
99

1010
final class VoltServiceProvider extends ServiceProvider
1111
{
12-
/**
13-
* Register services.
14-
*/
1512
public function register(): void
1613
{
17-
//
14+
1815
}
1916

20-
/**
21-
* Bootstrap services.
22-
*/
2317
public function boot(): void
2418
{
2519
Volt::mount([

resources/views/livewire/pages/auth/login.blade.php

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
{
1212
public LoginForm $form;
1313
14-
/**
15-
* Handle an incoming authentication request.
16-
*/
1714
public function login(): void
1815
{
1916
$this->validate();
@@ -25,7 +22,6 @@ public function login(): void
2522
$this->redirectIntended(default: route('dashboard', absolute: false), navigate: true);
2623
}
2724
}; ?>
28-
{{-- <x-app-layout :title="__('pages/auth.login.page_title')"> --}}
2925
<div>
3026
<x-container class="flex min-h-full items-center justify-center py-16 sm:pt-24">
3127
<div class="w-full max-w-md space-y-8">
@@ -37,7 +33,6 @@ public function login(): void
3733
<form class="space-y-6" wire:submit.prevent="login">
3834
@csrf
3935
<div class="space-y-4">
40-
<!-- Email Input -->
4136
<div class="space-y-1">
4237
<label for="email" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
4338
{{ __('validation.attributes.email') }}
@@ -56,7 +51,6 @@ class="block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:
5651
@enderror
5752
</div>
5853

59-
<!-- Password Input -->
6054
<div class="space-y-1">
6155
<label for="password" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
6256
{{ __('validation.attributes.password') }}
@@ -77,7 +71,6 @@ class="block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:
7771
</div>
7872

7973
<div class="flex items-center justify-between">
80-
<!-- Remember Me Checkbox -->
8174
<div class="flex items-center">
8275
<input
8376
type="checkbox"
@@ -90,7 +83,6 @@ class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"
9083
</label>
9184
</div>
9285

93-
<!-- Forgot Password Link -->
9486
<div class="text-sm">
9587
<a href="{{ route('password.request') }}" class="font-medium text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-white">
9688
{{ __('pages/auth.login.forgot_password') }}
@@ -113,78 +105,6 @@ class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"
113105

114106
<x-join-sponsors :title="__('global.sponsor_thanks')" />
115107
</div>
116-
117-
{{-- </x-app-layout> --}}
118-
119-
120-
{{-- <x-app-layout :title="__('pages/auth.login.page_title')">
121-
<x-container class="flex min-h-full items-center justify-center py-16 sm:pt-24">
122-
<div class="w-full max-w-md space-y-8">
123-
<div>
124-
<h2 class="text-center font-heading text-3xl font-extrabold text-gray-900 dark:text-white">
125-
{{ __('pages/auth.login.title') }}
126-
</h2>
127-
</div>
128-
<form class="space-y-6" action="{{ route('login') }}" method="POST">
129-
@csrf
130-
<div class="space-y-4">
131-
<x-filament::input.wrapper>
132-
<x-filament::input
133-
type="text"
134-
id="email-address"
135-
name="email"
136-
autocomplete="email"
137-
required="true"
138-
aria-label="{{ __('validation.attributes.email') }}"
139-
:placeholder="__('validation.attributes.email')"
140-
/>
141-
</x-filament::input.wrapper>
142-
<x-filament::input.wrapper>
143-
<x-filament::input
144-
type="password"
145-
id="password"
146-
name="password"
147-
required="true"
148-
aria-label="{{ __('validation.attributes.password') }}"
149-
:placeholder="__('validation.attributes.password')"
150-
/>
151-
</x-filament::input.wrapper>
152-
</div>
153-
154-
<div class="flex items-center justify-between">
155-
<div class="flex items-center">
156-
<label class="inline-flex items-center gap-2 cursor-pointer text-sm text-gray-500 dark:text-gray-400">
157-
<x-filament::input.checkbox id="remember_me" name="remember_me" />
158-
{{ __('pages/auth.login.remember_me') }}
159-
</label>
160-
</div>
161-
162-
<div class="text-sm">
163-
<x-link
164-
:href="route('password.request')"
165-
class="font-medium text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-white"
166-
>
167-
{{ __('pages/auth.login.forgot_password') }}
168-
</x-link>
169-
</div>
170-
</div>
171-
172-
<div>
173-
<x-buttons.primary type="submit" class="group relative w-full">
174-
<span class="absolute pointer-events-none inset-y-0 left-0 flex items-center pl-3">
175-
<x-untitledui-lock class="size-5 text-green-500 group-hover:text-green-600" aria-hidden="true" />
176-
</span>
177-
{{ __('pages/auth.login.submit') }}
178-
</x-buttons.primary>
179-
</div>
180-
</form>
181-
182-
@include('partials._socials-link')
183-
</div>
184-
</x-container>
185-
186-
<x-join-sponsors :title="__('global.sponsor_thanks')" />
187-
</x-app-layout> --}}
188108

189109

190110

Lines changed: 1 addition & 190 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<<<<<<< HEAD
21
<x-app-layout :title="__('pages/auth.register.page_title')">
32
<x-container class="py-12 sm:py-16 lg:pt-20">
43
<div class="lg:grid lg:gap-12 lg:grid-cols-2">
@@ -136,192 +135,4 @@
136135
</x-container>
137136

138137
<x-join-sponsors :title="__('global.sponsor_thanks')" />
139-
</x-app-layout>
140-
=======
141-
<?php
142-
143-
use App\Models\User;
144-
use Illuminate\Auth\Events\Registered;
145-
use Illuminate\Support\Facades\Auth;
146-
use Illuminate\Support\Facades\Hash;
147-
use Illuminate\Validation\Rules;
148-
use Livewire\Attributes\Layout;
149-
use Livewire\Volt\Component;
150-
151-
new #[Layout('layouts.guest')] class extends Component
152-
{
153-
public string $name = '';
154-
public string $email = '';
155-
public string $username = '';
156-
public string $password = '';
157-
public string $password_confirmation = '';
158-
159-
public function register(): void
160-
{
161-
$validated = $this->validate([
162-
'name' => ['required', 'string', 'max:255'],
163-
'email' => ['required', 'string', 'lowercase', 'email', 'max:255', 'unique:'.User::class],
164-
'username' => ['required', 'string', 'max:255', 'unique:'.User::class],
165-
'password' => ['required', 'string', 'confirmed', Rules\Password::defaults()],
166-
]);
167-
168-
$validated['password'] = Hash::make($validated['password']);
169-
170-
event(new Registered($user = User::create($validated)));
171-
172-
Auth::login($user);
173-
174-
$this->redirect(route('dashboard'), navigate: true);
175-
}
176-
};
177-
?>
178-
179-
{{-- <x-app-layout :title="__('pages/auth.register.page_title')"> --}}
180-
<div>
181-
<x-container class="py-12 sm:py-16 lg:pt-20">
182-
<div class="lg:grid lg:gap-12 lg:grid-cols-2">
183-
<div class="hidden items-center justify-center lg:flex">
184-
<div>
185-
<h3 class="text-lg font-semibold leading-6 text-gray-700 dark:text-gray-300">
186-
{{ __('pages/auth.register.advantages.heading') }}
187-
</h3>
188-
<dl class="mt-10 grid gap-6 grid-cols-2">
189-
<x-site-feature
190-
:title="__('pages/auth.register.advantages.podcast')"
191-
:description="__('pages/auth.register.advantages.podcast_description')"
192-
>
193-
<x-slot:icon>
194-
<x-icon.podcast class="size-8" aria-hidden="true" />
195-
</x-slot:icon>
196-
</x-site-feature>
197-
198-
<!-- Autres éléments de fonctionnalité ici... -->
199-
200-
</dl>
201-
</div>
202-
</div>
203-
204-
<div class="mx-auto max-w-md space-y-8">
205-
<div class="space-y-3 text-center">
206-
<h2 class="font-heading text-3xl font-extrabold text-gray-900 dark:text-white">
207-
{{ __('pages/auth.register.join_us') }}
208-
</h2>
209-
<x-profile-users />
210-
<p class="leading-6 text-gray-500 dark:text-gray-400">
211-
{{ __('pages/auth.register.joins_description') }}
212-
</p>
213-
</div>
214-
215-
<div>
216-
<x-status-message />
217-
218-
<form wire:submit.prevent="register" class="space-y-6">
219-
@csrf
220-
<div class="space-y-3">
221-
<!-- Name Input -->
222-
<div class="space-y-1">
223-
<label for="name" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
224-
{{ __('validation.attributes.name') }}
225-
</label>
226-
<input
227-
type="text"
228-
id="name"
229-
wire:model.defer="name"
230-
name="name"
231-
required
232-
class="block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white"
233-
placeholder="{{ __('validation.attributes.name') }}"
234-
/>
235-
@error('name') <span class="text-sm text-red-500">{{ $message }}</span> @enderror
236-
</div>
237-
238-
<!-- Email Input -->
239-
<div class="space-y-1">
240-
<label for="email" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
241-
{{ __('validation.attributes.email') }}
242-
</label>
243-
<input
244-
type="email"
245-
id="email"
246-
wire:model.defer="email"
247-
name="email"
248-
required
249-
class="block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white"
250-
placeholder="{{ __('validation.attributes.email') }}"
251-
/>
252-
@error('email') <span class="text-sm text-red-500">{{ $message }}</span> @enderror
253-
</div>
254-
255-
<!-- Username Input -->
256-
<div class="space-y-1">
257-
<label for="username" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
258-
{{ __('validation.attributes.username') }}
259-
</label>
260-
<input
261-
type="text"
262-
id="username"
263-
wire:model.defer="username"
264-
name="username"
265-
required
266-
class="block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white"
267-
placeholder="{{ __('validation.attributes.username') }}"
268-
/>
269-
@error('username') <span class="text-sm text-red-500">{{ $message }}</span> @enderror
270-
</div>
271-
272-
<!-- Password Input -->
273-
<div class="space-y-1">
274-
<label for="password" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
275-
{{ __('validation.attributes.password') }}
276-
</label>
277-
<input
278-
type="password"
279-
id="password"
280-
wire:model.defer="password"
281-
name="password"
282-
required
283-
class="block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white"
284-
placeholder="{{ __('pages/auth.register.password_placeholder') }}"
285-
/>
286-
@error('password') <span class="text-sm text-red-500">{{ $message }}</span> @enderror
287-
</div>
288-
289-
<!-- Password Confirmation Input -->
290-
<div class="space-y-1">
291-
<label for="password_confirmation" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
292-
{{ __('validation.attributes.password_confirmation') }}
293-
</label>
294-
<input
295-
type="password"
296-
id="password_confirmation"
297-
wire:model.defer="password_confirmation"
298-
name="password_confirmation"
299-
required
300-
class="block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white"
301-
placeholder="{{ __('pages/auth.register.password_confirm_placeholder') }}"
302-
/>
303-
@error('password_confirmation') <span class="text-sm text-red-500">{{ $message }}</span> @enderror
304-
</div>
305-
</div>
306-
307-
<div>
308-
<x-buttons.primary type="submit" class="group w-full relative">
309-
<span class="absolute inset-y-0 left-0 flex items-center pl-3">
310-
<x-untitledui-lock class="size-5 text-green-500 group-hover:text-green-600" aria-hidden="true" />
311-
</span>
312-
{{ __('pages/auth.register.submit') }}
313-
</x-buttons.primary>
314-
</div>
315-
</form>
316-
</div>
317-
318-
@include('partials._socials-link')
319-
</div>
320-
</div>
321-
</x-container>
322-
323-
324-
<x-join-sponsors :title="__('global.sponsor_thanks')" />
325-
</div>
326-
{{-- </x-app-layout> --}}
327-
>>>>>>> c512f79 (feat: (LAR-77) Mise en place de la class Login, et correction de la connexion)
138+
</x-app-layout>

0 commit comments

Comments
 (0)