rector: arrrrr

This commit is contained in:
Andras Bacsai
2025-01-07 14:52:08 +01:00
parent c702ebff6d
commit 16c0cd10d8
349 changed files with 4204 additions and 3712 deletions

View File

@@ -5,6 +5,7 @@ namespace App\Livewire\Project\Application;
use App\Models\Application;
use Livewire\Attributes\Validate;
use Livewire\Component;
use Throwable;
class Advanced extends Component
{
@@ -71,9 +72,11 @@ class Advanced extends Component
{
try {
$this->syncData();
} catch (\Throwable $e) {
} catch (Throwable $e) {
return handleError($e, $this);
}
return null;
}
public function syncData(bool $toModel = false)
@@ -127,14 +130,12 @@ class Advanced extends Component
public function instantSave()
{
try {
if ($this->isLogDrainEnabled) {
if (! $this->application->destination->server->isLogDrainEnabled()) {
$this->isLogDrainEnabled = false;
$this->syncData(true);
$this->dispatch('error', 'Log drain is not enabled on this server.');
if ($this->isLogDrainEnabled && ! $this->application->destination->server->isLogDrainEnabled()) {
$this->isLogDrainEnabled = false;
$this->syncData(true);
$this->dispatch('error', 'Log drain is not enabled on this server.');
return;
}
return null;
}
if ($this->application->isForceHttpsEnabled() !== $this->isForceHttpsEnabled ||
$this->application->isGzipEnabled() !== $this->isGzipEnabled ||
@@ -151,9 +152,11 @@ class Advanced extends Component
$this->syncData(true);
$this->dispatch('success', 'Settings saved.');
$this->dispatch('configurationChanged');
} catch (\Throwable $e) {
} catch (Throwable $e) {
return handleError($e, $this);
}
return null;
}
public function submit()
@@ -165,13 +168,15 @@ class Advanced extends Component
$this->gpuDeviceIds = null;
$this->syncData(true);
return;
return null;
}
$this->syncData(true);
$this->dispatch('success', 'Settings saved.');
} catch (\Throwable $e) {
} catch (Throwable $e) {
return handleError($e, $this);
}
return null;
}
public function saveCustomName()