This commit is contained in:
Andras Bacsai 2023-05-15 22:17:31 +02:00
parent 3575972c43
commit e635dc4316
2 changed files with 12 additions and 3 deletions

View File

@ -62,7 +62,7 @@ public function saveConfiguration()
return generalErrorHandler($e); return generalErrorHandler($e);
} }
} }
public function checkProxySettingsInSync() public function resetProxy()
{ {
try { try {
$this->proxy_settings = resolve(CheckProxySettingsInSync::class)($this->server, true); $this->proxy_settings = resolve(CheckProxySettingsInSync::class)($this->server, true);
@ -70,4 +70,12 @@ public function checkProxySettingsInSync()
return generalErrorHandler($e); return generalErrorHandler($e);
} }
} }
public function checkProxySettingsInSync()
{
try {
$this->proxy_settings = resolve(CheckProxySettingsInSync::class)($this->server);
} catch (\Exception $e) {
return generalErrorHandler($e);
}
}
} }

View File

@ -23,7 +23,8 @@
@endif @endif
<x-inputs.button isBold wire:click="stopProxy">Stop</x-inputs.button> <x-inputs.button isBold wire:click="stopProxy">Stop</x-inputs.button>
<span x-data="{ showConfiguration: false }"> <span x-data="{ showConfiguration: false }">
<x-inputs.button isBold x-on:click="showConfiguration = !showConfiguration">Show Configuration <x-inputs.button isBold x-on:click.prevent="showConfiguration = !showConfiguration">Show
Configuration
</x-inputs.button> </x-inputs.button>
<div class="pt-4"> <div class="pt-4">
<livewire:activity-monitor /> <livewire:activity-monitor />
@ -41,7 +42,7 @@
wire:click.prevent="installProxy"> wire:click.prevent="installProxy">
Apply Apply
</x-inputs.button> </x-inputs.button>
<x-inputs.button isBold wire:click.prevent="checkProxySettingsInSync"> <x-inputs.button isBold wire:click.prevent="resetProxy">
Default Default
</x-inputs.button> </x-inputs.button>
<textarea wire:model.defer="proxy_settings" class="w-full" rows="30"></textarea> <textarea wire:model.defer="proxy_settings" class="w-full" rows="30"></textarea>