lasthourcloud/resources/views/livewire/private-key/change.blade.php

53 lines
2.2 KiB
PHP
Raw Normal View History

2023-07-28 11:31:47 +00:00
<div x-data="{ showPrivateKey: false }">
<x-modal yesOrNo modalId="deletePrivateKey" modalTitle="Delete Private Key">
<x-slot:modalBody>
<p>This private key will be deleted. It is not reversible. <br>Please think again.</p>
</x-slot:modalBody>
</x-modal>
2023-12-07 18:06:32 +00:00
<form class="flex flex-col gap-2" wire:submit='changePrivateKey'>
2023-06-15 13:38:15 +00:00
<div class="flex items-end gap-2">
2023-09-04 07:44:44 +00:00
<h2>Private Key</h2>
<x-forms.button type="submit">
Save
</x-forms.button>
2023-06-22 18:52:49 +00:00
@if ($private_key->id > 0)
2023-07-28 11:31:47 +00:00
<x-forms.button isError isModal modalId="deletePrivateKey">
2023-06-22 18:52:49 +00:00
Delete
</x-forms.button>
@endif
2023-06-15 13:38:15 +00:00
</div>
2023-08-11 18:19:42 +00:00
<x-forms.input id="private_key.name" label="Name" required />
<x-forms.input id="private_key.description" label="Description" />
2023-06-15 07:58:17 +00:00
<div>
<div class="flex items-end gap-2 py-2 ">
<div class="pl-1 ">Public Key</div>
</div>
<x-forms.input readonly id="public_key" />
2023-06-15 07:58:17 +00:00
<div class="flex items-end gap-2 py-2 ">
2023-06-16 10:35:40 +00:00
<div class="pl-1 ">Private Key <span class='text-helper'>*</span></div>
2023-06-15 07:58:17 +00:00
<div class="text-xs text-white underline cursor-pointer" x-cloak x-show="!showPrivateKey"
2023-08-11 18:19:42 +00:00
x-on:click="showPrivateKey = true">
Edit
2023-06-15 07:58:17 +00:00
</div>
<div class="text-xs text-white underline cursor-pointer" x-cloak x-show="showPrivateKey"
2023-08-11 18:19:42 +00:00
x-on:click="showPrivateKey = false">
2023-06-15 07:58:17 +00:00
Hide
</div>
</div>
2023-06-19 08:58:00 +00:00
@if ($private_key->is_git_related)
<div class="w-48">
2023-08-11 18:19:42 +00:00
<x-forms.checkbox id="private_key.is_git_related" disabled label="Is used by a Git App?" />
2023-06-19 08:58:00 +00:00
</div>
@endif
2023-06-15 07:58:17 +00:00
<div x-cloak x-show="!showPrivateKey">
2023-07-13 11:16:24 +00:00
<x-forms.input allowToPeak="false" type="password" rows="10" id="private_key.private_key" required
2023-08-11 18:19:42 +00:00
disabled />
2023-06-15 07:58:17 +00:00
</div>
<div x-cloak x-show="showPrivateKey">
2023-08-11 18:19:42 +00:00
<x-forms.textarea rows="10" id="private_key.private_key" required />
2023-06-15 07:58:17 +00:00
</div>
</div>
2023-05-03 10:38:57 +00:00
</form>
</div>