improvement

This commit is contained in:
Bryce
2025-08-03 12:18:54 -07:00
parent 4c2333a110
commit f5938c5586
8 changed files with 224 additions and 65 deletions

View File

@@ -1,13 +1,23 @@
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{% for folder in folders %}
<div class="card rounded-lg p-6 shadow-lg">
<div class="flex justify-between items-start mb-4">
<h3 class="text-xl font-bold">{{ folder.name }}</h3>
<div class="flex space-x-2">
<button class="p-2 rounded-full hover:bg-slate-700">
<div class="card bg-base-100 shadow-sm">
<div class="card-body">
<div class="flex justify-between items-start mb-2">
<h3 class="text-xl font-bold">{{ folder.name }}</h3>
<div class="flex space-x-2">
<button class="btn"
@click="$dispatch('open-edit-folder-modal', {
detail: {
id: '{{ folder.id }}',
name: '{{ folder.name }}',
rule_text: '{{ folder.rule_text }}',
priority: '{{ folder.priority or 0 }}'
}
})">
Edit
<i class="fas fa-edit"></i>
</button>
<button class="p-2 rounded-full hover:bg-slate-700 text-red-400"
<button class="text-red-400 btn"
hx-delete="/api/folders/{{ folder.id }}"
hx-target="#folders-list"
hx-swap="innerHTML"
@@ -15,20 +25,24 @@
<i class="fas fa-trash"></i>
</button>
</div>
</div>
<p class="text-secondary mb-4">{{ folder.rule_text }}</p>
</div>
<ul class="list bg-base-200 rounded">
<li class="list-row">{{ folder.rule_text }}</li>
</ul>
<div class="flex justify-between items-center">
<span class="text-xs px-2 py-1 rounded-full bg-slate-700">Priority: {{ folder.priority or 'Normal' }}</span>
<span class="text-xs text-secondary">0 emails</span>
<span class="badge badge-primary">Priority: {{ folder.priority or 'Normal' }}</span>
<span class="text-xs badge badge-secondary">0 emails</span>
</div>
</div>
</div>
{% else %}
<div class="col-span-full text-center py-12">
<div class="text-5xl mb-4 text-secondary">
<div class="text-5xl mb-4">
<i class="fas fa-folder-open"></i>
</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>
<p class="mb-4">Add your first folder to get started organizing your emails.</p>
<button class="btn btn-primary" @click="$dispatch('open-add-folder-modal')">
<i class="fas fa-plus mr-2"></i>
Create Folder