Implement secret deletion function
This commit is contained in:
@ -57,8 +57,8 @@
|
||||
<div class="p-4 bg-white border border-gray-200 rounded-lg shadow-sm sm:flex dark:border-gray-700 sm:p-6 dark:bg-gray-800" id="secret-tree">
|
||||
|
||||
|
||||
<div class="flex flex-col">
|
||||
<div class="h-full">
|
||||
<div class="flex flex-1 flex-col">
|
||||
<div class="h-full w-full">
|
||||
<sl-tree class="tree-with-icons">
|
||||
<sl-tree-item
|
||||
id="secret-group-root-item"
|
||||
|
||||
@ -1,4 +1,35 @@
|
||||
<div class="w-full" id="secretdetails">
|
||||
|
||||
<!-- menu -->
|
||||
|
||||
<div class="flex justify-end px-4">
|
||||
<button id="secret-menu-button" data-dropdown-toggle="secret-edit-menu" class="inline-block text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-4 focus:outline-none focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-1.5" type="button">
|
||||
<span class="sr-only">Open dropdown</span>
|
||||
<svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 3">
|
||||
<path d="M2 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm6.041 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM14 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z"/>
|
||||
</svg>
|
||||
</button>
|
||||
<!-- Dropdown menu -->
|
||||
<div id="secret-edit-menu" class="z-10 hidden text-base list-none bg-white divide-y divide-gray-100 rounded-lg shadow-sm w-44 dark:bg-gray-700">
|
||||
<ul class="py-2" aria-labelledby="secret-menu-button">
|
||||
<li>
|
||||
<a
|
||||
href="#"
|
||||
class="block px-4 py-2 text-sm text-red-600 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
|
||||
hx-delete="/secrets/{{secret.name}}"
|
||||
hx-target="#secretdetails"
|
||||
hx-swap="OuterHTML"
|
||||
hx-indicator=".secret-spinner"
|
||||
hx-confirm="Really delete this secret?"
|
||||
>
|
||||
Delete
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h3 class="mb-4 text-xl font-semibold dark:text-white">{{secret.name}}</h3>
|
||||
<div class="htmx-indicator secret-spinner">
|
||||
<div role="status">
|
||||
|
||||
Reference in New Issue
Block a user