Skip to content

Commit b02f349

Browse files
committed
Merge branch 'main' into Replace-reset-password-with-fortify
# Conflicts: # app/Http/Controllers/Auth/NewPasswordController.php
2 parents 3acdc7a + b164c3e commit b02f349

File tree

16 files changed

+78
-49
lines changed

16 files changed

+78
-49
lines changed

app/Http/Controllers/Auth/RegisteredUserController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Illuminate\Http\RedirectResponse;
99
use Illuminate\Http\Request;
1010
use Illuminate\Support\Facades\Auth;
11-
use Illuminate\Support\Facades\Hash;
1211
use Illuminate\Validation\Rules;
1312
use Inertia\Inertia;
1413
use Inertia\Response;
@@ -39,7 +38,7 @@ public function store(Request $request): RedirectResponse
3938
$user = User::create([
4039
'name' => $request->name,
4140
'email' => $request->email,
42-
'password' => Hash::make($request->password),
41+
'password' => $request->password,
4342
]);
4443

4544
event(new Registered($user));

app/Http/Controllers/Settings/PasswordController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use App\Http\Controllers\Controller;
66
use Illuminate\Http\RedirectResponse;
77
use Illuminate\Http\Request;
8-
use Illuminate\Support\Facades\Hash;
98
use Illuminate\Validation\Rules\Password;
109
use Inertia\Inertia;
1110
use Inertia\Response;
@@ -31,7 +30,7 @@ public function update(Request $request): RedirectResponse
3130
]);
3231

3332
$request->user()->update([
34-
'password' => Hash::make($validated['password']),
33+
'password' => $validated['password'],
3534
]);
3635

3736
return back();

app/Models/User.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ protected function casts(): array
4646
return [
4747
'email_verified_at' => 'datetime',
4848
'password' => 'hashed',
49+
'two_factor_confirmed_at' => 'datetime',
4950
];
5051
}
5152
}

database/factories/UserFactory.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Database\Factories;
44

55
use Illuminate\Database\Eloquent\Factories\Factory;
6-
use Illuminate\Support\Facades\Hash;
76
use Illuminate\Support\Str;
87

98
/**
@@ -27,7 +26,7 @@ public function definition(): array
2726
'name' => fake()->name(),
2827
'email' => fake()->unique()->safeEmail(),
2928
'email_verified_at' => now(),
30-
'password' => static::$password ??= Hash::make('password'),
29+
'password' => static::$password ??= 'password',
3130
'remember_token' => Str::random(10),
3231
'two_factor_secret' => Str::random(10),
3332
'two_factor_recovery_codes' => Str::random(10),

database/seeders/DatabaseSeeder.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use App\Models\User;
66
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
77
use Illuminate\Database\Seeder;
8-
use Illuminate\Support\Facades\Hash;
98

109
class DatabaseSeeder extends Seeder
1110
{
@@ -20,7 +19,7 @@ public function run(): void
2019
['email' => '[email protected]'],
2120
[
2221
'name' => 'Test User',
23-
'password' => Hash::make('password'),
22+
'password' => 'password',
2423
'email_verified_at' => now(),
2524
]
2625
);

package-lock.json

Lines changed: 29 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,16 @@
5454
"react-dom": "^19.0.0",
5555
"tailwind-merge": "^3.0.1",
5656
"tailwindcss": "^4.0.0",
57-
"tailwindcss-animate": "^1.0.7",
57+
"tw-animate-css": "^1.4.0",
5858
"typescript": "^5.7.2",
5959
"vite": "^7.0.4"
6060
},
6161
"optionalDependencies": {
6262
"@rollup/rollup-linux-x64-gnu": "4.9.5",
63+
"@rollup/rollup-win32-x64-msvc": "4.9.5",
6364
"@tailwindcss/oxide-linux-x64-gnu": "^4.0.1",
64-
"lightningcss-linux-x64-gnu": "^1.29.1"
65+
"@tailwindcss/oxide-win32-x64-msvc": "^4.0.1",
66+
"lightningcss-linux-x64-gnu": "^1.29.1",
67+
"lightningcss-win32-x64-msvc": "^1.29.1"
6568
}
6669
}

resources/css/app.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@import 'tailwindcss';
22

3-
@plugin 'tailwindcss-animate';
3+
@import "tw-animate-css";
44

55
@source '../views';
66
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';

resources/js/components/two-factor-setup-modal.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ import { OTP_MAX_LENGTH } from '@/hooks/use-two-factor-auth';
1717
import { confirm } from '@/routes/two-factor';
1818
import { Form } from '@inertiajs/react';
1919
import { REGEXP_ONLY_DIGITS } from 'input-otp';
20-
import { Check, Copy, Loader2, ScanLine } from 'lucide-react';
20+
import { Check, Copy, ScanLine } from 'lucide-react';
2121
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2222
import AlertError from './alert-error';
23+
import { Spinner } from './ui/spinner';
2324

2425
function GridScanIcon() {
2526
return (
@@ -79,7 +80,7 @@ function TwoFactorSetupStep({
7980
}}
8081
/>
8182
) : (
82-
<Loader2 className="flex size-4 animate-spin" />
83+
<Spinner />
8384
)}
8485
</div>
8586
</div>
@@ -102,7 +103,7 @@ function TwoFactorSetupStep({
102103
<div className="flex w-full items-stretch overflow-hidden rounded-xl border border-border">
103104
{!manualSetupKey ? (
104105
<div className="flex h-full w-full items-center justify-center bg-muted p-3">
105-
<Loader2 className="size-4 animate-spin" />
106+
<Spinner />
106107
</div>
107108
) : (
108109
<>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Loader2Icon } from "lucide-react"
2+
3+
import { cn } from "@/lib/utils"
4+
5+
function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
6+
return (
7+
<Loader2Icon
8+
role="status"
9+
aria-label="Loading"
10+
className={cn("size-4 animate-spin", className)}
11+
{...props}
12+
/>
13+
)
14+
}
15+
16+
export { Spinner }

0 commit comments

Comments
 (0)