coolify/resources/views/auth/register.blade.php

99 lines
5.1 KiB
PHP
Raw Normal View History

2024-06-08 02:02:01 +00:00
<?php
if (! function_exists('getOldOrLocal')) {
function getOldOrLocal($key, $localValue)
{
return old($key) != '' ? old($key) : (app()->environment('local') ? $localValue : '');
}
2024-06-08 02:05:42 +00:00
}
$name = getOldOrLocal('name', 'test3 normal user');
$email = getOldOrLocal('email', 'test3@example.com');
2024-06-08 02:02:01 +00:00
?>
2023-05-16 07:05:38 +00:00
<x-layout-simple>
2024-03-20 14:46:59 +00:00
<section class="bg-gray-50 dark:bg-base">
<div class="flex flex-col items-center justify-center px-6 py-8 mx-auto md:h-screen lg:py-0">
2025-10-16 15:01:32 +00:00
<div class="w-full max-w-md space-y-8">
<div class="text-center space-y-2">
<h1 class="!text-5xl font-extrabold tracking-tight text-gray-900 dark:text-white">
2025-10-16 15:01:32 +00:00
Coolify
</h1>
<p class="text-lg dark:text-neutral-400">
Create your account
</p>
</div>
<div class="space-y-6">
@if ($isFirstUser)
<div class="mb-6 p-4 bg-warning/10 border border-warning rounded-lg">
<div class="flex gap-3">
<svg class="size-5 text-warning flex-shrink-0 mt-0.5" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
clip-rule="evenodd" />
</svg>
<div>
<p class="font-bold text-warning">Root User Setup</p>
<p class="text-sm dark:text-white text-black">This user will be the root user with full
admin access.</p>
2025-10-16 15:01:32 +00:00
</div>
</div>
2025-10-16 15:01:32 +00:00
</div>
@endif
@if ($errors->any())
<div class="mb-6 p-4 bg-error/10 border border-error rounded-lg">
@foreach ($errors->all() as $error)
<p class="text-sm text-error">{{ $error }}</p>
@endforeach
</div>
@endif
<form action="/register" method="POST" class="flex flex-col gap-4">
2024-03-20 14:46:59 +00:00
@csrf
2024-06-08 02:02:01 +00:00
<x-forms.input id="name" required type="text" name="name" value="{{ $name }}"
label="{{ __('input.name') }}" />
2024-06-08 02:02:01 +00:00
<x-forms.input id="email" required type="email" name="email" value="{{ $email }}"
label="{{ __('input.email') }}" />
2024-10-29 09:13:06 +00:00
<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') }}" />
2025-10-16 15:01:32 +00:00
<div
class="p-4 bg-neutral-50 dark:bg-coolgray-200 rounded-lg border border-neutral-200 dark:border-coolgray-400">
2025-10-16 15:01:32 +00:00
<p class="text-xs dark:text-neutral-400">
Your password should be min 8 characters long and contain at least one uppercase letter,
one lowercase letter, one number, and one symbol.
2025-10-16 15:01:32 +00:00
</p>
2024-03-20 14:46:59 +00:00
</div>
2025-10-16 15:01:32 +00:00
<x-forms.button class="w-full justify-center py-3 box-boarding mt-2" type="submit"
isHighlighted>
2025-10-16 15:01:32 +00:00
Create Account
</x-forms.button>
2024-03-20 14:46:59 +00:00
</form>
2025-10-16 15:01:32 +00:00
@if (!$isFirstUser)
<div class="relative my-6">
<div class="absolute inset-0 flex items-center">
<div class="w-full border-t border-neutral-300 dark:border-coolgray-400"></div>
</div>
<div class="relative flex justify-center text-sm">
<span class="px-2 bg-gray-50 dark:bg-base text-neutral-500 dark:text-neutral-400">
Already have an account?
</span>
</div>
2025-10-16 15:01:32 +00:00
</div>
<a href="{{ route('login') }}"
class="block w-full text-center py-3 px-4 rounded-lg border border-neutral-300 dark:border-coolgray-400 font-medium hover:border-coollabs dark:hover:border-warning transition-colors">
{{ __('auth.already_registered') }}
</a>
@endif
2023-05-25 12:05:44 +00:00
</div>
2024-03-20 14:46:59 +00:00
</div>
</div>
2024-03-20 14:46:59 +00:00
</section>
</x-layout-simple>