suport delete

This commit is contained in:
Bryce
2025-08-03 11:17:13 -07:00
parent b0952aee58
commit 4c2333a110
11 changed files with 148 additions and 102 deletions

View File

@@ -7,7 +7,11 @@
<button class="p-2 rounded-full hover:bg-slate-700">
<i class="fas fa-edit"></i>
</button>
<button class="p-2 rounded-full hover:bg-slate-700 text-red-400">
<button class="p-2 rounded-full hover:bg-slate-700 text-red-400"
hx-delete="/api/folders/{{ folder.id }}"
hx-target="#folders-list"
hx-swap="innerHTML"
hx-confirm="Are you sure you want to delete this folder?">
<i class="fas fa-trash"></i>
</button>
</div>
@@ -25,7 +29,7 @@
</div>
<h3 class="text-xl font-semibold mb-2">No folders yet</h3>
<p class="text-secondary mb-4">Add your first folder to get started organizing your emails.</p>
<button class="btn btn-primary" onclick="document.getElementById('add-folder-modal').showModal()">
<button class="btn btn-primary" @click="$dispatch('open-add-folder-modal')">
<i class="fas fa-plus mr-2"></i>
Create Folder
</button>