Refactor code and update UI components

This commit is contained in:
Andras Bacsai
2024-03-22 11:34:15 +01:00
parent ca9a2cb13a
commit 8b7e1e4169
51 changed files with 592 additions and 609 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Livewire\Project;
use App\Models\PrivateKey;
use App\Models\Project;
use App\Models\Server;
use Livewire\Component;
@@ -10,7 +11,9 @@ class Index extends Component
{
public $projects;
public $servers;
public $private_keys;
public function mount() {
$this->private_keys = PrivateKey::ownedByCurrentTeam()->get();
$this->projects = Project::ownedByCurrentTeam()->get();
$this->servers = Server::ownedByCurrentTeam()->count();
}

View File

@@ -26,7 +26,7 @@ class Navbar extends Component
];
}
public function serviceStarted() {
$this->dispatch('success', 'Service started.');
$this->dispatch('success', 'Service status changed.');
}
public function serviceStatusChanged()
{

View File

@@ -59,7 +59,7 @@ class ServiceApplicationView extends Component
$this->validate();
$this->application->save();
updateCompose($this->application);
$this->dispatch('success', 'Application saved.');
$this->dispatch('success', 'Service saved.');
} catch (\Throwable $e) {
return handleError($e, $this);
} finally {