This commit is contained in:
Andras Bacsai
2023-06-22 20:52:49 +02:00
parent daec4ac9b6
commit 7ce1dc0d48
5 changed files with 18 additions and 12 deletions

View File

@@ -4,12 +4,14 @@
<form class="flex flex-col gap-2" wire:submit.prevent='changePrivateKey'>
<div class="flex items-end gap-2">
<h1>Private Key</h1>
<x-forms.button type="submit">
Save
</x-forms.button>
<x-forms.button x-on:click.prevent="deletePrivateKey = true">
Delete
</x-forms.button>
@if ($private_key->id > 0)
<x-forms.button type="submit">
Save
</x-forms.button>
<x-forms.button x-on:click.prevent="deletePrivateKey = true">
Delete
</x-forms.button>
@endif
</div>
<div class="pb-8">Private Key used for SSH connection</div>
<x-forms.input id="private_key.name" label="Name" required />
@@ -36,7 +38,11 @@
disabled />
</div>
<div x-cloak x-show="showPrivateKey">
<x-forms.textarea rows="10" id="private_key.private_key" required />
@if ($private_key->id > 0)
<x-forms.textarea rows="10" id="private_key.private_key" disabled />
@else
<x-forms.textarea rows="10" id="private_key.private_key" required />
@endif
</div>
</div>
</form>