fix: login / register view

This commit is contained in:
Andras Bacsai
2024-10-29 10:13:06 +01:00
parent 0938c60c1e
commit f87b158c9b
2 changed files with 23 additions and 30 deletions

View File

@@ -5,6 +5,13 @@
Coolify
</a>
<div class="w-full bg-white shadow md:mt-0 sm:max-w-md xl:p-0 dark:bg-base ">
@if ($errors->any())
<div class="text-center text-error">
@foreach ($errors->all() as $error)
<p>{{ $error }}</p>
@endforeach
</div>
@endif
<div class="p-6 space-y-4 md:space-y-6 sm:p-8">
<form action="/login" method="POST" class="flex flex-col gap-2">
@csrf
@@ -27,28 +34,22 @@
{{ __('auth.forgot_password') }}?
</a>
@endenv
<x-forms.button class="mt-10" type="submit">{{ __('auth.login') }}</x-forms.button>
<x-forms.button class="mt-4" type="submit">{{ __('auth.login') }}</x-forms.button>
@if (session('error'))
<div class="mb-4 font-medium text-red-600">
{{ session('error') }}
</div>
@endif
@if (!$is_registration_enabled)
<div class="text-center text-neutral-500">{{ __('auth.registration_disabled') }}</div>
@endif
@if ($errors->any())
<div class="text-xs text-center text-error">
@foreach ($errors->all() as $error)
<p>{{ $error }}</p>
@endforeach
</div>
@endif
@if (session('status'))
<div class="mb-4 font-medium text-green-600">
{{ session('status') }}
</div>
@endif
@if (session('error'))
<div class="mb-4 font-medium text-red-600">
{{ session('error') }}
</div>
@endif
</form>
@if ($is_registration_enabled)
<a href="/register" class="button bg-coollabs-gradient">

View File

@@ -32,25 +32,17 @@ $email = getOldOrLocal('email', 'test3@example.com');
label="{{ __('input.name') }}" />
<x-forms.input id="email" required type="email" name="email" value="{{ $email }}"
label="{{ __('input.email') }}" />
<div class="flex gap-2">
<x-forms.input id="password" required type="password" name="password"
label="{{ __('input.password') }}" />
<x-forms.input id="password_confirmation" required type="password"
name="password_confirmation" label="{{ __('input.password.again') }}" />
<x-forms.input id="password" required type="password" name="password"
label="{{ __('input.password') }}" />
<x-forms.input id="password_confirmation" required type="password" name="password_confirmation"
label="{{ __('input.password.again') }}" />
<div class="flex flex-col gap-4 pt-8 w-full">
<x-forms.button class="w-full" type="submit">Register</x-forms.button>
<a href="/login" class="w-full">
{{ __('auth.already_registered') }}
</a>
</div>
<x-forms.button class="mb-4" type="submit">Register</x-forms.button>
<a href="/login" class="button bg-coollabs-gradient">
{{ __('auth.already_registered') }}
</a>
</form>
@if ($errors->any())
<div class="text-xs text-center text-error">
@foreach ($errors->all() as $error)
<p>{{ $error }}</p>
@endforeach
</div>
@endif
</div>
</div>
</div>