feat: resolve linter warnings, optimize tables scroll behavior with top scroll sync, and extract reusable table macros

This commit is contained in:
2026-05-31 06:03:54 +05:00
parent 478d5f3c17
commit 58c929dd38
15 changed files with 718 additions and 325 deletions
+12 -14
View File
@@ -107,17 +107,16 @@
</div>
<!-- Logs Table -->
<div class="bg-[#1e293b]/40 backdrop-blur-xl border border-slate-900 rounded-3xl shadow-2xl overflow-hidden mb-8">
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-slate-800 text-left text-sm text-slate-300">
<thead>
<tr class="text-xs font-bold text-slate-400 uppercase tracking-wider bg-slate-900/30">
<th class="px-6 py-4">Timestamp</th>
<th class="px-6 py-4">User</th>
<th class="px-6 py-4">Event</th>
<th class="px-6 py-4">Target Entity</th>
<th class="px-6 py-4">IP / Details</th>
<th class="px-6 py-4 text-right">Replay Payload</th>
{{ ui::table_container_open(id="audit-table", has_top_scroll=true, max_height="68vh") }}
<table class="min-w-full divide-y divide-slate-800 text-left text-sm text-slate-300 relative">
<thead class="shadow-[0_1px_0_0_rgba(255,255,255,0.05)]">
<tr class="text-xs font-bold text-slate-400 uppercase tracking-wider">
<th class="sticky top-0 z-10 px-6 py-4 bg-[#162031]">Timestamp</th>
<th class="sticky top-0 z-10 px-6 py-4 bg-[#162031]">User</th>
<th class="sticky top-0 z-10 px-6 py-4 bg-[#162031]">Event</th>
<th class="sticky top-0 z-10 px-6 py-4 bg-[#162031]">Target Entity</th>
<th class="sticky top-0 z-10 px-6 py-4 bg-[#162031]">IP / Details</th>
<th class="sticky top-0 z-10 px-6 py-4 bg-[#162031] text-right">Replay Payload</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-800">
@@ -215,8 +214,7 @@
{% endif %}
</tbody>
</table>
</div>
</div>
{{ ui::table_container_close(id="audit-table", has_top_scroll=true) }}
<!-- Footer Navigation -->
<div class="mt-6 text-center text-sm text-slate-400">
@@ -225,7 +223,7 @@
</div>
<!-- Purge Modal Dialog -->
<div id="purge-modal" class="modal-dialog fixed inset-0 z-50 flex items-center justify-center hidden" role="dialog" aria-modal="true">
<div id="purge-modal" class="modal-dialog fixed inset-0 z-50 items-center justify-center hidden" role="dialog" aria-modal="true">
<div class="modal-backdrop fixed inset-0 bg-[#07090e]/80 backdrop-blur-sm transition-opacity duration-300"></div>
<div class="modal-content relative z-10 w-full max-w-md scale-95 opacity-0 transition-all duration-300 border border-border bg-popover/95 backdrop-blur-xl p-6 shadow-2xl rounded-3xl">
<div class="mx-auto flex h-10 w-10 items-center justify-center rounded-full bg-rose-500/10 border border-rose-500/20 text-rose-400 mb-3">