Fix styling

This commit is contained in:
Thijmen
2024-06-10 20:43:34 +00:00
committed by github-actions[bot]
parent 41fb6a1fc9
commit d86274cc37
429 changed files with 5307 additions and 2831 deletions

View File

@@ -8,17 +8,22 @@ use Livewire\Component;
class DynamicConfigurationNavbar extends Component
{
public $server_id;
public $fileName = '';
public $value = '';
public $newFile = false;
public function delete(string $fileName)
{
$server = Server::ownedByCurrentTeam()->whereId($this->server_id)->first();
$proxy_path = $server->proxyPath();
$proxy_type = $server->proxyType();
$file = str_replace('|', '.', $fileName);
if ($proxy_type === 'CADDY' && $file === "Caddyfile") {
if ($proxy_type === 'CADDY' && $file === 'Caddyfile') {
$this->dispatch('error', 'Cannot delete Caddyfile.');
return;
}
instant_remote_process(["rm -f {$proxy_path}/dynamic/{$file}"], $server);
@@ -29,6 +34,7 @@ class DynamicConfigurationNavbar extends Component
$this->dispatch('loadDynamicConfigurations');
$this->dispatch('refresh');
}
public function render()
{
return view('livewire.server.proxy.dynamic-configuration-navbar');