fix: able to change localhost's private key

This commit is contained in:
Andras Bacsai
2023-07-25 14:43:49 +02:00
parent 341f64839b
commit 6cd29ad7e4
9 changed files with 142 additions and 121 deletions

View File

@@ -4,10 +4,10 @@
<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>
@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>
@@ -21,7 +21,7 @@
<div class="pl-1 ">Private Key <span class='text-helper'>*</span></div>
<div class="text-xs text-white underline cursor-pointer" x-cloak x-show="!showPrivateKey"
x-on:click="showPrivateKey = true">
Show
Edit
</div>
<div class="text-xs text-white underline cursor-pointer" x-cloak x-show="showPrivateKey"
x-on:click="showPrivateKey = false">
@@ -38,11 +38,7 @@
disabled />
</div>
<div x-cloak x-show="showPrivateKey">
@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
<x-forms.textarea rows="10" id="private_key.private_key" required />
</div>
</div>
</form>