feat: add email verification for cloud
This commit is contained in:
@@ -5,10 +5,11 @@ namespace App\Http\Livewire;
|
||||
use App\Actions\Server\UpdateCoolify;
|
||||
use App\Models\InstanceSettings;
|
||||
use Livewire\Component;
|
||||
use Masmerise\Toaster\Toaster;
|
||||
use DanHarrin\LivewireRateLimiting\WithRateLimiting;
|
||||
|
||||
class Upgrade extends Component
|
||||
{
|
||||
use WithRateLimiting;
|
||||
public bool $showProgress = false;
|
||||
public bool $isUpgradeAvailable = false;
|
||||
public string $latestVersion = '';
|
||||
@@ -31,6 +32,7 @@ class Upgrade extends Component
|
||||
public function upgrade()
|
||||
{
|
||||
try {
|
||||
$this->rateLimit(1, 30);
|
||||
if ($this->showProgress) {
|
||||
return;
|
||||
}
|
||||
|
||||
26
app/Http/Livewire/VerifyEmail.php
Normal file
26
app/Http/Livewire/VerifyEmail.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use Livewire\Component;
|
||||
use DanHarrin\LivewireRateLimiting\WithRateLimiting;
|
||||
|
||||
class VerifyEmail extends Component
|
||||
{
|
||||
use WithRateLimiting;
|
||||
public function again() {
|
||||
try {
|
||||
$this->rateLimit(1, 300);
|
||||
auth()->user()->sendVerificationEmail();
|
||||
$this->emit('success', 'Email verification link sent!');
|
||||
|
||||
} catch(\Exception $e) {
|
||||
ray($e);
|
||||
return handleError($e,$this);
|
||||
}
|
||||
}
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.verify-email');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user