mirror of
https://github.com/brufdev/many-notes.git
synced 2026-05-25 04:39:07 -05:00
Clean files
This commit is contained in:
@@ -9,7 +9,7 @@ class ForgotPassword extends Component
|
||||
{
|
||||
public ForgotPasswordForm $form;
|
||||
|
||||
public function send()
|
||||
public function send(): void
|
||||
{
|
||||
$this->form->sendPasswordResetLink();
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ class Register extends Component
|
||||
{
|
||||
public RegisterForm $form;
|
||||
|
||||
public function send()
|
||||
public function send(): void
|
||||
{
|
||||
$this->form->register();
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ class ResetPassword extends Component
|
||||
public function mount(string $token): void
|
||||
{
|
||||
$this->form->setToken($token);
|
||||
|
||||
$this->form->setEmail(request()->string('email'));
|
||||
}
|
||||
|
||||
|
||||
@@ -3,17 +3,8 @@
|
||||
namespace App\Livewire\Forms;
|
||||
|
||||
use Livewire\Form;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\Rules;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Illuminate\Auth\Events\Lockout;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
use Illuminate\Support\Facades\RateLimiter;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class ForgotPasswordForm extends Form
|
||||
{
|
||||
|
||||
@@ -69,6 +69,6 @@ class LoginForm extends Form
|
||||
*/
|
||||
protected function throttleKey(): string
|
||||
{
|
||||
return Str::transliterate(Str::lower($this->email).'|'.request()->ip());
|
||||
return Str::transliterate(Str::lower($this->email) . '|' . request()->ip());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,24 +4,22 @@ namespace App\Livewire\Forms;
|
||||
|
||||
use Livewire\Form;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\Rules;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Illuminate\Auth\Events\Lockout;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Support\Facades\RateLimiter;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
class RegisterForm extends Form
|
||||
{
|
||||
public string $name = '';
|
||||
|
||||
public string $email = '';
|
||||
|
||||
public string $password = '';
|
||||
|
||||
public string $password_confirmation = '';
|
||||
|
||||
public function rules()
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
@@ -36,12 +34,8 @@ class RegisterForm extends Form
|
||||
public function register(): void
|
||||
{
|
||||
$validated = $this->validate();
|
||||
|
||||
$validated['password'] = Hash::make($validated['password']);
|
||||
|
||||
event(new Registered($user = User::create($validated)));
|
||||
|
||||
Auth::login($user);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ use Livewire\Form;
|
||||
use Illuminate\Support\Str;
|
||||
use Livewire\Attributes\Locked;
|
||||
use Illuminate\Validation\Rules;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
@@ -16,11 +15,14 @@ class ResetPasswordForm extends Form
|
||||
{
|
||||
#[Locked]
|
||||
public string $token = '';
|
||||
|
||||
public string $email = '';
|
||||
|
||||
public string $password = '';
|
||||
|
||||
public string $password_confirmation = '';
|
||||
|
||||
public function rules()
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'token' => ['required'],
|
||||
|
||||
@@ -14,12 +14,12 @@ class Row extends Component
|
||||
|
||||
public $showEditModal = false;
|
||||
|
||||
public function mount()
|
||||
public function mount(): void
|
||||
{
|
||||
$this->form->setVault($this->vault);
|
||||
}
|
||||
|
||||
public function update()
|
||||
public function update(): void
|
||||
{
|
||||
$this->authorize('update', $this->vault);
|
||||
$this->validate();
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<svg {{ $attributes }} xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
||||
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
||||
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
||||
<path class="opacity-75" fill="currentColor"
|
||||
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z">
|
||||
</path>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 387 B |
@@ -1,4 +1,5 @@
|
||||
<header class="border-b bg-light-base-100 dark:bg-base-800 text-light-base-700 dark:text-base-200 border-light-base-300 dark:border-base-500">
|
||||
<header
|
||||
class="border-b bg-light-base-100 dark:bg-base-800 text-light-base-700 dark:text-base-200 border-light-base-300 dark:border-base-500">
|
||||
<div class="md:container md:mx-auto">
|
||||
<div class="flex justify-between px-4 py-5">
|
||||
{{ $slot }}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
<main class="flex flex-col flex-grow gap-10 place-content-center bg-light-base-200 dark:bg-base-950 text-light-base-950 dark:text-base-50">
|
||||
<main
|
||||
class="flex flex-col flex-grow gap-10 place-content-center bg-light-base-200 dark:bg-base-950 text-light-base-950 dark:text-base-50">
|
||||
<div class="mx-auto">
|
||||
<h1 class="text-3xl font-semibold">Many Notes</h1>
|
||||
</div>
|
||||
|
||||
<div class="md:container md:mx-auto">
|
||||
<div class="flex flex-col gap-6 p-6 rounded-lg sm:mx-auto sm:w-full sm:max-w-sm sm:p-10 bg-light-base-50 dark:bg-base-900">
|
||||
<div
|
||||
class="flex flex-col gap-6 p-6 rounded-lg sm:mx-auto sm:w-full sm:max-w-sm sm:p-10 bg-light-base-50 dark:bg-base-900">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
<button
|
||||
x-ref="button"
|
||||
@click="menuOpen = !menuOpen"
|
||||
@keydown.escape="menuOpen = false"
|
||||
class="flex items-center"
|
||||
>
|
||||
<button x-ref="button" @click="menuOpen = !menuOpen" @keydown.escape="menuOpen = false" class="flex items-center">
|
||||
{{ $slot }}
|
||||
</button>
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<div>
|
||||
<a
|
||||
{{ $attributes }}
|
||||
class="flex items-center w-full gap-2 px-3 py-1 text-sm text-left transition-colors rounded hover:bg-light-base-400 dark:hover:bg-base-700 text-light-base-950 dark:text-base-50"
|
||||
>
|
||||
<a {{ $attributes }}
|
||||
class="flex items-center w-full gap-2 px-3 py-1 text-sm text-left transition-colors rounded hover:bg-light-base-400 dark:hover:bg-base-700 text-light-base-950 dark:text-base-50">
|
||||
{{ $slot }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
<div
|
||||
{{ $attributes }}
|
||||
x-on:click="modalOpen = false"
|
||||
>
|
||||
<div {{ $attributes }} x-on:click="modalOpen = false">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
<div
|
||||
x-data="{ modalOpen: false }"
|
||||
x-modelable="modalOpen"
|
||||
{{ $attributes }}
|
||||
tabindex="-1"
|
||||
>
|
||||
<div x-data="{ modalOpen: false }" x-modelable="modalOpen" {{ $attributes }} tabindex="-1">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user