diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php index 620435eed5..239fd4c8e6 100644 --- a/resources/lang/en/auth.php +++ b/resources/lang/en/auth.php @@ -15,12 +15,4 @@ return [ 'signin' => 'Sign in to your account', - 'labels' => [ - - 'email' => 'E-mail Address', - - 'password' => 'Password', - - ], - ]; diff --git a/resources/views/components/input-group-stacked.blade.php b/resources/views/components/input-group-stacked.blade.php index fe8f2a4e27..422423e871 100644 --- a/resources/views/components/input-group-stacked.blade.php +++ b/resources/views/components/input-group-stacked.blade.php @@ -7,7 +7,7 @@ 'errorClasses' => $errors->has($name) ? ' motion-safe:animate-shake' : '', ]) -
merge(['class' => 'space-y-1'.$errorClasses]) }}> +
merge(['class' => 'space-y-2'.$errorClasses]) }}>
{{ $label ?? $name }} diff --git a/resources/views/livewire/auth/forgot-password.blade.php b/resources/views/livewire/auth/forgot-password.blade.php index ae4b9ee983..05fc2ed18e 100644 --- a/resources/views/livewire/auth/forgot-password.blade.php +++ b/resources/views/livewire/auth/forgot-password.blade.php @@ -1,6 +1,6 @@
- + diff --git a/resources/views/livewire/auth/login.blade.php b/resources/views/livewire/auth/login.blade.php index 031cb98635..7b13f9daa6 100644 --- a/resources/views/livewire/auth/login.blade.php +++ b/resources/views/livewire/auth/login.blade.php @@ -1,9 +1,9 @@ - + - + @if (Route::has('filament.password.forgot')) diff --git a/resources/views/livewire/auth/reset-password.blade.php b/resources/views/livewire/auth/reset-password.blade.php new file mode 100644 index 0000000000..32d6fcc006 --- /dev/null +++ b/resources/views/livewire/auth/reset-password.blade.php @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + {{ __('Reset Password') }} + + \ No newline at end of file diff --git a/src/Http/Livewire/Auth/Login.php b/src/Http/Livewire/Auth/Login.php index 976801832c..358b4b22af 100644 --- a/src/Http/Livewire/Auth/Login.php +++ b/src/Http/Livewire/Auth/Login.php @@ -36,12 +36,12 @@ class Login extends Component $this->incrementLoginAttempts($request); - $this->addError('email', trans('auth.failed')); + $this->addError('email', __('auth.failed')); } public function render() { return view('filament::livewire.auth.login') - ->layout('filament::layouts.auth', ['title' => trans('filament::auth.signin')]); + ->layout('filament::layouts.auth', ['title' => __('filament::auth.signin')]); } } \ No newline at end of file diff --git a/src/Http/Livewire/Auth/ResetPassword.php b/src/Http/Livewire/Auth/ResetPassword.php index 81d15529dc..9c3e049db6 100644 --- a/src/Http/Livewire/Auth/ResetPassword.php +++ b/src/Http/Livewire/Auth/ResetPassword.php @@ -4,10 +4,13 @@ namespace Filament\Http\Livewire\Auth; use App\Providers\RouteServiceProvider; use Illuminate\Auth\Events\PasswordReset; -use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Facades\Hash; -use Illuminate\Support\Facades\Password; +use Illuminate\Http\Request; use Illuminate\Support\Str; +use Illuminate\Support\Facades\{ + Auth, + Hash, + Password, +}; use Livewire\Component; class ResetPassword extends Component @@ -23,9 +26,10 @@ class ResetPassword extends Component 'password_confirmation' => 'required', ]; - public function mount($token) + public function mount(Request $request, $token) { $this->token = $token; + $this->email = $request->input('email'); } protected function credentials() @@ -49,6 +53,7 @@ class ResetPassword extends Component $this->user = $user; } ); + if ($status === Password::PASSWORD_RESET) { Auth::login($this->user); $this->redirect(route('filament.dashboard')); diff --git a/tests/Feature/LoginTest.php b/tests/Feature/LoginTest.php index 57af676c37..7e9ef0641d 100644 --- a/tests/Feature/LoginTest.php +++ b/tests/Feature/LoginTest.php @@ -17,7 +17,7 @@ class LoginTest extends TestCase // $this->withoutExceptionHandling(); $this->get(route('filament.login')) ->assertSuccessful() - ->assertSee(trans('filament::auth.signin')); + ->assertSee(__('filament::auth.signin')); } public function test_existing_user_can_log_in()