ui: redesign

This commit is contained in:
Andras Bacsai
2024-03-20 12:54:06 +01:00
parent 91950e1891
commit b61860b3ab
85 changed files with 1537 additions and 961 deletions

View File

@@ -9,7 +9,7 @@ use Livewire\Component;
class Index extends Component
{
public Application $application;
public array|Collection $deployments = [];
public ?Collection $deployments;
public int $deployments_count = 0;
public string $current_url;
public int $skip = 0;
@@ -48,9 +48,9 @@ class Index extends Component
}
private function show_more()
{
if (count($this->deployments) !== 0) {
if ($this->deployments->count() !== 0) {
$this->show_next = true;
if (count($this->deployments) < $this->default_take) {
if ($this->deployments->count() < $this->default_take) {
$this->show_next = false;
}
return;
@@ -63,7 +63,6 @@ class Index extends Component
}
public function previous_page(?int $take = null)
{
if ($take) {
$this->skip = $this->skip - $take;
}