Skip to content

Commit

Permalink
fix: ui
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed Nov 25, 2024
1 parent 40cc495 commit 0bfe0fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 1 addition & 2 deletions app/Livewire/Server/Advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Advanced extends Component
#[Validate('boolean')]
public bool $forceDockerCleanup = false;

#[Validate('string')]
#[Validate(['string', 'required'])]
public string $dockerCleanupFrequency = '*/10 * * * *';

#[Validate(['integer', 'min:1', 'max:99'])]
Expand Down Expand Up @@ -78,7 +78,6 @@ public function instantSave()
try {
$this->syncData(true);
$this->dispatch('success', 'Server updated.');
// $this->dispatch('refreshServerShow');
} catch (\Throwable $e) {
return handleError($e, $this);
}
Expand Down
9 changes: 8 additions & 1 deletion app/Livewire/Settings/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Index extends Component
#[Validate('string')]
public string $auto_update_frequency;

#[Validate('string')]
#[Validate('string|required')]
public string $update_check_frequency;

#[Validate('required|string|timezone')]
Expand Down Expand Up @@ -109,6 +109,13 @@ public function mount()

public function instantSave($isSave = true)
{
$this->validate();
if ($this->settings->is_auto_update_enabled === true) {
$this->validate([
'auto_update_frequency' => ['required', 'string'],
]);
}

$this->settings->fqdn = $this->fqdn;
$this->settings->resale_license = $this->resale_license;
$this->settings->public_port_min = $this->public_port_min;
Expand Down

0 comments on commit 0bfe0fd

Please sign in to comment.