fix: registration/login button

fix: init user registrations
This commit is contained in:
Andras Bacsai 2023-06-29 17:16:50 +02:00
parent 80af200c9f
commit fed35d9c13
3 changed files with 8 additions and 4 deletions

View File

@ -52,6 +52,11 @@ public function boot(): void
Fortify::loginView(function () {
$settings = InstanceSettings::get();
$users = User::count();
if ($users == 0) {
// If there are no users, redirect to registration
return redirect()->route('register');
}
return view('auth.login', [
'is_registration_enabled' => $settings->is_registration_enabled
]);

View File

@ -97,7 +97,7 @@ @keyframes lds-heart {
}
}
.bg-coollabs-gradient {
@apply text-transparent bg-clip-text bg-gradient-to-r from-purple-500 via-pink-500 to-red-500;
@apply text-transparent text-white bg-gradient-to-r from-purple-500 via-pink-500 to-red-500;
}
.text-helper {
@apply inline-block font-bold text-warning;

View File

@ -8,8 +8,7 @@
<div class="flex items-center gap-2">
<h1>{{ __('auth.login') }}</h1>
@if ($is_registration_enabled)
<a href="/register"
class="text-xs text-center text-white normal-case bg-transparent border-none rounded no-animation hover:no-underline btn btn-sm bg-coollabs-gradient">
<a href="/register" class="text-xs normal-case hover:no-underline btn btn-sm bg-coollabs-gradient">
{{ __('auth.register_now') }}
</a>
@endif
@ -41,7 +40,7 @@ class="text-xs text-center text-white normal-case bg-transparent border-none rou
</div>
@endif
@if (session('status'))
<div class="mb-4 font-medium text-green-600">
<div class="mb-4 font-medium text-green-600">
{{ session('status') }}
</div>
@endif