fix: proxy change behaviour
This commit is contained in:
parent
03d53b06d6
commit
1886347b55
1 changed files with 3 additions and 2 deletions
|
|
@ -16,6 +16,7 @@ class Proxy extends Component
|
||||||
public $proxy_settings = null;
|
public $proxy_settings = null;
|
||||||
|
|
||||||
public bool $redirect_enabled = true;
|
public bool $redirect_enabled = true;
|
||||||
|
|
||||||
public ?string $redirect_url = null;
|
public ?string $redirect_url = null;
|
||||||
|
|
||||||
protected $listeners = ['proxyStatusUpdated', 'saveConfiguration' => 'submit'];
|
protected $listeners = ['proxyStatusUpdated', 'saveConfiguration' => 'submit'];
|
||||||
|
|
@ -40,7 +41,7 @@ public function changeProxy()
|
||||||
{
|
{
|
||||||
$this->server->proxy = null;
|
$this->server->proxy = null;
|
||||||
$this->server->save();
|
$this->server->save();
|
||||||
$this->dispatch('proxyChanged');
|
$this->dispatch('reloadWindow');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function selectProxy($proxy_type)
|
public function selectProxy($proxy_type)
|
||||||
|
|
@ -48,7 +49,7 @@ public function selectProxy($proxy_type)
|
||||||
try {
|
try {
|
||||||
$this->server->changeProxy($proxy_type, async: false);
|
$this->server->changeProxy($proxy_type, async: false);
|
||||||
$this->selectedProxy = $this->server->proxy->type;
|
$this->selectedProxy = $this->server->proxy->type;
|
||||||
$this->dispatch('proxyStatusUpdated');
|
$this->dispatch('reloadWindow');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue