This commit is contained in:
Andras Bacsai
2023-05-25 14:05:44 +02:00
parent ea2a13dff2
commit d2b0823cd0
40 changed files with 284 additions and 279 deletions

View File

@@ -2,30 +2,32 @@
<div class="flex items-center justify-center h-screen">
<div>
<div class="pb-8 text-5xl font-bold tracking-tight text-center text-white">Coolify</div>
<div class="flex items-center gap-2">
<h1 class="pb-0">{{ __('auth.login') }}</h1>
@if ($is_registration_enabled)
<a href="/register" class="flex justify-center pt-2">
<x.inputs-button>{{ __('auth.register-now') }}</x.inputs-button>
</a>
@else
<div class="text-sm text-center">{{ __('auth.registration_disabled') }}</div>
@endif
</div>
<div class="w-96">
<form action="/login" method="POST" class="flex flex-col gap-2">
@csrf
<input type="email" name="email" placeholder="{{ __('input.email') }}"
@env('local') value="test@example.com" @endenv autofocus />
<input type="password" name="password" placeholder="{{ __('input.password') }}"
@env('local') value="password" @endenv />
<x-forms.input required type="email" name="email" label="{{ __('input.email') }}" autofocus />
<x-forms.input required type="password" name="password" label="{{ __('input.password') }}" />
@if ($errors->any())
<div class="text-center text-error">
<span>{{ __('auth.failed') }}</span>
</div>
@endif
<x-inputs.button type="submit">{{ __('auth.login') }}</x-inputs.button>
<x-forms.button type="submit">{{ __('auth.login') }}</x-forms.button>
</form>
</div>
@if ($is_registration_enabled)
<a href="/register" class="flex justify-center pt-2">
<button>{{ __('auth.register') }}</button>
</a>
@else
<div class="text-sm text-center">{{ __('auth.registration_disabled') }}</div>
@endif
</div>
</div>

View File

@@ -1,28 +1,31 @@
<x-layout-simple>
<div class="flex items-center justify-center h-screen">
<div>
<div class="pb-8 text-5xl font-bold tracking-tight text-center text-white">Coolify</div>
<div class="flex items-center gap-2">
<h1 class="pb-0">{{ __('auth.register') }}</h1>
<a href="/login" class="flex justify-center pt-2">
<x.inputs-button>{{ __('auth.already-registered') }}</x.inputs-button>
</a>
</div>
<form action="/register" method="POST" class="flex flex-col gap-2">
@csrf
<input type="text" name="name" placeholder="{{ __('input.name') }}"
@env('local') value="root" @endenv />
<input type="email" name="email" placeholder="{{ __('input.email') }}"
@env('local') value="test@example.com" @endenv />
<input type="password" name="password" placeholder="{{ __('input.password') }}"
@env('local') value="password" @endenv />
<input type="password" name="password_confirmation" placeholder="{{ __('input.password.again') }}"
@env('local') value="password" @endenv />
<x-inputs.button type="submit">{{ __('auth.register') }}</x-inputs.button>
<x-forms.input required type="text" name="name" label="{{ __('input.name') }}" />
<x-forms.input required type="email" name="email" label="{{ __('input.email') }}" />
<div class="flex gap-2">
<x-forms.input required type="password" name="password" label="{{ __('input.password') }}" />
<x-forms.input required type="password" name="password_confirmation"
label="{{ __('input.password.again') }}" />
</div>
<x-forms.button type="submit">{{ __('auth.register') }}</x-forms.button>
</form>
@if ($errors->any())
<div class="fixed top-0 alert alert-error">
<div class="fixed top-0 text-xs alert alert-error">
<ul>
<li>{{ __('auth.failed') }}</li>
</ul>
</div>
@endif
<a href="/login" class="flex justify-center pt-2">
<button>{{ __('auth.login') }}</button>
</a>
</div>
</div>
</x-layout-simple>