7
7
use Livewire\Attributes\ Layout ;
8
8
use Livewire\Volt\ Component ;
9
9
10
- new # [Layout('layouts.guest')] class extends Component
10
+ new class extends Component
11
11
{
12
12
public LoginForm $form ;
13
13
@@ -22,74 +22,62 @@ public function login(): void
22
22
$this -> redirectIntended (default : route (' dashboard' , absolute : false ), navigate : true );
23
23
}
24
24
}; ? >
25
+
25
26
<div >
26
27
<x-container class =" flex min-h-full items-center justify-center py-16 sm:pt-24" >
27
28
<div class =" w-full max-w-md space-y-8" >
28
29
<div >
30
+ <x-validation-errors />
29
31
<h2 class =" text-center font-heading text-3xl font-extrabold text-gray-900 dark:text-white" >
30
32
{{ __ (' pages/auth.login.title' ) } }
31
33
</h2 >
32
34
</div >
33
- <form class =" space-y-6" wire:submit.prevent =" login" >
35
+ <form class =" space-y-6" wire:submit =" login" >
34
36
@csrf
35
37
<div class =" space-y-4" >
36
- <div class =" space-y-1" >
37
- <label for =" email" class =" block text-sm font-medium text-gray-700 dark:text-gray-300" >
38
- {{ __ (' validation.attributes.email' ) } }
39
- </label >
40
- <x-text-input
41
- type =" email"
42
- id =" email"
43
- wire:model =" form.email"
44
- name =" email"
45
- required
46
- placeholder =" {{ __ (' validation.attributes.email' ) } }"
47
- 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"
38
+ <x-filament::input .wrapper >
39
+ <x-filament::input
40
+ type =" text"
41
+ id =" email-address"
42
+ name =" email"
43
+ autocomplete =" email"
44
+ required =" true"
45
+ wire:model =" form.email"
46
+ aria-label =" {{ __ (' validation.attributes.email' ) } }"
47
+ :placeholder =" __('validation.attributes.email')"
48
48
/>
49
- @error (' form.email' )
50
- <span class =" text-sm text-red-500" >{{ $message } } </span >
51
- @enderror
52
- </div >
53
-
54
- <div class =" space-y-1" >
55
- <label for =" password" class =" block text-sm font-medium text-gray-700 dark:text-gray-300" >
56
- {{ __ (' validation.attributes.password' ) } }
57
- </label >
58
- <x-text-input
59
- type =" password"
60
- id =" password"
49
+ </x-filament::input .wrapper >
50
+ <x-filament::input .wrapper >
51
+ <x-filament::input
52
+ type =" password"
53
+ id =" password"
54
+ name =" password"
55
+ required =" true"
61
56
wire:model =" form.password"
62
- name =" password"
63
- required
64
- placeholder =" {{ __ (' validation.attributes.password' ) } }"
65
- 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"
57
+ aria-label =" {{ __ (' validation.attributes.password' ) } }"
58
+ :placeholder =" __('validation.attributes.password')"
66
59
/>
67
- @error (' form.password' )
68
- <span class =" text-sm text-red-500" >{{ $message } } </span >
69
- @enderror
70
- </div >
60
+ </x-filament::input .wrapper >
71
61
</div >
72
-
62
+
73
63
<div class =" flex items-center justify-between" >
74
64
<div class =" flex items-center" >
75
- <input
76
- type =" checkbox"
77
- id =" remember_me"
78
- wire:model =" form.remember"
79
- class =" h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"
80
- />
81
- <label for =" remember_me" class =" ml-2 block text-sm text-gray-500 dark:text-gray-400" >
65
+ <label class =" inline-flex items-center gap-2 cursor-pointer text-sm text-gray-500 dark:text-gray-400" >
66
+ <x-filament::input .checkbox id =" remember_me" name =" remember_me" />
82
67
{{ __ (' pages/auth.login.remember_me' ) } }
83
68
</label >
84
69
</div >
85
-
70
+
86
71
<div class =" text-sm" >
87
- <a href =" {{ route (' password.request' ) } }" class =" font-medium text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-white" >
72
+ <x-link
73
+ :href =" route('password.request')"
74
+ class =" font-medium text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-white"
75
+ >
88
76
{{ __ (' pages/auth.login.forgot_password' ) } }
89
- </a >
77
+ </x-link >
90
78
</div >
91
79
</div >
92
-
80
+
93
81
<div >
94
82
<x-buttons .primary type =" submit" class =" group relative w-full" >
95
83
<span class =" absolute pointer-events-none inset-y-0 left-0 flex items-center pl-3" >
@@ -99,10 +87,11 @@ class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"
99
87
</x-buttons .primary >
100
88
</div >
101
89
</form >
90
+
102
91
@include (' partials._socials-link' )
103
92
</div >
104
93
</x-container >
105
-
94
+
106
95
<x-join-sponsors :title =" __('global.sponsor_thanks')" />
107
96
</div >
108
97
0 commit comments