Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: registration/login button fix: init user registrations

Andras Bacsaifed35d9c1370
diff --git a/app/Providers/FortifyServiceProvider.php b/app/Providers/FortifyServiceProvider.php
index a1b116560b..0a3d02ff7a 100644
--- a/app/Providers/FortifyServiceProvider.php
+++ b/app/Providers/FortifyServiceProvider.php
@@ -52,6 +52,11 @@ class FortifyServiceProvider extends ServiceProvider
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
]);
diff --git a/resources/css/app.css b/resources/css/app.css
index 8602c69a5a..1ed610d1c1 100644
--- a/resources/css/app.css
+++ b/resources/css/app.css
@@ -97,7 +97,7 @@ a {
}
}
.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;
diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php
index 1bb5c9b287..0a66be6094 100644
--- a/resources/views/auth/login.blade.php
+++ b/resources/views/auth/login.blade.php
@@ -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 @@
</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