diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 72893f974..39b0881e3 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -5,11 +5,9 @@ namespace App\Http\Controllers; use App\Models\InstanceSettings; use App\Models\Project; use App\Models\S3Storage; -use App\Models\Server; use App\Models\StandalonePostgresql; use App\Models\TeamInvitation; use App\Models\User; -use App\Models\Waitlist; use Illuminate\Foundation\Auth\Access\AuthorizesRequests; use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Routing\Controller as BaseController; @@ -19,12 +17,6 @@ class Controller extends BaseController { use AuthorizesRequests, ValidatesRequests; - public function waitlist() { - $waiting_in_line = Waitlist::whereVerified(true)->count(); - return view('auth.waitlist', [ - 'waiting_in_line' => $waiting_in_line, - ]); - } public function subscription() { if (!isCloud()) { diff --git a/app/Http/Livewire/Dashboard.php b/app/Http/Livewire/Dashboard.php index 98c330847..874e389e0 100644 --- a/app/Http/Livewire/Dashboard.php +++ b/app/Http/Livewire/Dashboard.php @@ -6,7 +6,6 @@ use App\Models\Project; use App\Models\S3Storage; use App\Models\Server; use Livewire\Component; -use Log; class Dashboard extends Component { diff --git a/app/Http/Livewire/Waitlist.php b/app/Http/Livewire/Waitlist/Index.php similarity index 77% rename from app/Http/Livewire/Waitlist.php rename to app/Http/Livewire/Waitlist/Index.php index d9b3b92ab..06d224afe 100644 --- a/app/Http/Livewire/Waitlist.php +++ b/app/Http/Livewire/Waitlist/Index.php @@ -1,22 +1,27 @@ 'required|email', ]; + public function render() + { + return view('livewire.waitlist.index')->layout('layouts.simple'); + } public function mount() { + $this->waitingInLine = Waitlist::whereVerified(true)->count(); if (isDev()) { $this->email = 'waitlist@example.com'; } @@ -29,7 +34,7 @@ class Waitlist extends Component if ($already_registered) { throw new \Exception('You are already on the waitlist or registered.
Please check your email to verify your email address or contact support.'); } - $found = ModelsWaitlist::where('email', $this->email)->first(); + $found = Waitlist::where('email', $this->email)->first(); if ($found) { if (!$found->verified) { $this->emit('error', 'You are already on the waitlist.
Please check your email to verify your email address.'); @@ -38,7 +43,7 @@ class Waitlist extends Component $this->emit('error', 'You are already on the waitlist.
You will be notified when your turn comes.
Thank you.'); return; } - $waitlist = ModelsWaitlist::create([ + $waitlist = Waitlist::create([ 'email' => $this->email, 'type' => 'registration', ]); diff --git a/app/Providers/FortifyServiceProvider.php b/app/Providers/FortifyServiceProvider.php index eee442390..a5fce4858 100644 --- a/app/Providers/FortifyServiceProvider.php +++ b/app/Providers/FortifyServiceProvider.php @@ -43,22 +43,16 @@ class FortifyServiceProvider extends ServiceProvider */ public function boot(): void { - Fortify::createUsersUsing(CreateNewUser::class); Fortify::registerView(function () { $settings = InstanceSettings::get(); - $waiting_in_line = Waitlist::whereVerified(true)->count(); if (!$settings->is_registration_enabled) { return redirect()->route('login'); } if (config('coolify.waitlist')) { - return view('auth.waitlist',[ - 'waiting_in_line' => $waiting_in_line, - ]); + return redirect()->route('waitlist.index'); } else { - return view('auth.register',[ - 'waiting_in_line' => $waiting_in_line, - ]); + return view('auth.register'); } }); diff --git a/resources/views/auth/waitlist.blade.php b/resources/views/auth/waitlist.blade.php deleted file mode 100644 index 497bb0868..000000000 --- a/resources/views/auth/waitlist.blade.php +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/resources/views/components/pricing-plans.blade.php b/resources/views/components/pricing-plans.blade.php index 95a9ee4d3..c231f1d21 100644 --- a/resources/views/components/pricing-plans.blade.php +++ b/resources/views/components/pricing-plans.blade.php @@ -192,6 +192,15 @@ Basic Support +
  • + + Included Email System +
  • @@ -250,6 +259,15 @@ Priority Support
  • +
  • + + Included Email System +
  • diff --git a/resources/views/livewire/waitlist.blade.php b/resources/views/livewire/waitlist/index.blade.php similarity index 98% rename from resources/views/livewire/waitlist.blade.php rename to resources/views/livewire/waitlist/index.blade.php index 60b807872..06c5f9d5a 100644 --- a/resources/views/livewire/waitlist.blade.php +++ b/resources/views/livewire/waitlist/index.blade.php @@ -23,7 +23,7 @@ Join Waitlist - Waiting in the line: {{ $waiting_in_line }} + Waiting in the line: {{ $waitingInLine }}
    See the pricing here.
    diff --git a/routes/web.php b/routes/web.php index 8c4734a82..d59b9a48d 100644 --- a/routes/web.php +++ b/routes/web.php @@ -11,6 +11,7 @@ use App\Http\Livewire\Boarding\Server as BoardingServer; use App\Http\Livewire\Dashboard; use App\Http\Livewire\Server\All; use App\Http\Livewire\Server\Show; +use App\Http\Livewire\Waitlist\Index as WaitlistIndex; use App\Models\GithubApp; use App\Models\GitlabApp; use App\Models\InstanceSettings; @@ -46,7 +47,7 @@ Route::post('/forgot-password', function (Request $request) { } return response()->json(['message' => 'Transactional emails are not active'], 400); })->name('password.forgot'); -Route::get('/waitlist', [Controller::class, 'waitlist'])->name('auth.waitlist'); +Route::get('/waitlist', WaitlistIndex::class)->name('waitlist.index'); Route::prefix('magic')->middleware(['auth'])->group(function () { Route::get('/servers', [MagicController::class, 'servers']);