Merge branch 'dep-and-remove-unused-stuff' of https://github.com/peaklabs-dev/coolify into dep-and-remove-unused-stuff

This commit is contained in:
peaklabs-dev
2024-11-12 15:20:05 +01:00
5 changed files with 167 additions and 44 deletions

View File

@@ -4,7 +4,6 @@ namespace App\Livewire\Server;
use App\Actions\Proxy\CheckConfiguration;
use App\Actions\Proxy\SaveConfiguration;
use App\Actions\Proxy\StartProxy;
use App\Models\Server;
use Livewire\Component;
@@ -44,14 +43,13 @@ class Proxy extends Component
public function selectProxy($proxy_type)
{
$this->server->proxy->set('status', 'exited');
$this->server->proxy->set('type', $proxy_type);
$this->server->save();
$this->selectedProxy = $this->server->proxy->type;
if ($this->server->proxySet()) {
StartProxy::run($this->server, false);
try {
$this->server->changeProxy($proxy_type, async: false);
$this->selectedProxy = $this->server->proxy->type;
$this->dispatch('proxyStatusUpdated');
} catch (\Throwable $e) {
return handleError($e, $this);
}
$this->dispatch('proxyStatusUpdated');
}
public function instantSave()