2023-10-09 09:00:18 +00:00
|
|
|
<?php
|
|
|
|
|
2023-12-07 18:06:32 +00:00
|
|
|
namespace App\Livewire\Server;
|
2023-10-09 09:00:18 +00:00
|
|
|
|
|
|
|
use App\Models\PrivateKey;
|
2024-02-23 14:45:53 +00:00
|
|
|
use App\Models\Team;
|
2023-10-09 09:00:18 +00:00
|
|
|
use Livewire\Component;
|
|
|
|
|
|
|
|
class Create extends Component
|
|
|
|
{
|
|
|
|
public $private_keys = [];
|
2024-06-10 20:43:34 +00:00
|
|
|
|
2023-10-09 09:00:18 +00:00
|
|
|
public bool $limit_reached = false;
|
2024-06-10 20:43:34 +00:00
|
|
|
|
2023-10-09 09:00:18 +00:00
|
|
|
public function mount()
|
|
|
|
{
|
|
|
|
$this->private_keys = PrivateKey::ownedByCurrentTeam()->get();
|
2024-06-10 20:43:34 +00:00
|
|
|
if (! isCloud()) {
|
2023-10-09 09:00:18 +00:00
|
|
|
$this->limit_reached = false;
|
2024-06-10 20:43:34 +00:00
|
|
|
|
2023-10-09 09:00:18 +00:00
|
|
|
return;
|
|
|
|
}
|
2024-02-23 14:45:53 +00:00
|
|
|
$this->limit_reached = Team::serverLimitReached();
|
2023-10-09 09:00:18 +00:00
|
|
|
}
|
2024-06-10 20:43:34 +00:00
|
|
|
|
2023-10-09 09:00:18 +00:00
|
|
|
public function render()
|
|
|
|
{
|
|
|
|
return view('livewire.server.create');
|
|
|
|
}
|
|
|
|
}
|