diff --git a/app/Http/Livewire/Server/Form.php b/app/Http/Livewire/Server/Form.php
index 8c75f887e..1c01345bb 100644
--- a/app/Http/Livewire/Server/Form.php
+++ b/app/Http/Livewire/Server/Form.php
@@ -54,6 +54,11 @@ public function checkServer()
} catch (\Exception $e) {
}
}
+ public function delete()
+ {
+ $this->server->delete();
+ redirect()->route('dashboard');
+ }
public function submit()
{
$this->validate();
diff --git a/app/Http/Livewire/Server/New/ByIp.php b/app/Http/Livewire/Server/New/ByIp.php
index f003beb5f..e5fdafa98 100644
--- a/app/Http/Livewire/Server/New/ByIp.php
+++ b/app/Http/Livewire/Server/New/ByIp.php
@@ -45,6 +45,10 @@ public function addPrivateKey()
}
public function submit()
{
+ if (!$this->private_key_id) {
+ $this->addError('private_key_id', 'The private key field is required.');
+ return;
+ }
$server = Server::create([
'name' => $this->name,
'description' => $this->description,
diff --git a/app/View/Components/FormInput.php b/app/View/Components/FormInput.php
index a96dc3b6c..efe511b6a 100644
--- a/app/View/Components/FormInput.php
+++ b/app/View/Components/FormInput.php
@@ -19,6 +19,7 @@ public function __construct(
public string|null $type = 'text',
public bool $instantSave = false,
public bool $disabled = false,
+ public bool $hidden = false
) {
}
diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.php
index 77af63b9a..cd593ebd5 100644
--- a/resources/views/livewire/server/form.blade.php
+++ b/resources/views/livewire/server/form.blade.php
@@ -22,6 +22,9 @@
Submit
+
{{-- --}}
diff --git a/resources/views/livewire/server/new/by-ip.blade.php b/resources/views/livewire/server/new/by-ip.blade.php
index a12ad1523..6f16bece7 100644
--- a/resources/views/livewire/server/new/by-ip.blade.php
+++ b/resources/views/livewire/server/new/by-ip.blade.php
@@ -5,22 +5,29 @@