06/01 Optimize codes

This commit is contained in:
2026-06-01 17:07:00 -04:00
parent 25b15d8432
commit 4406d9734c
7 changed files with 231 additions and 10 deletions
+10 -1
View File
@@ -161,7 +161,16 @@
#sidebar { transform: translateX(-100%); width: var(--sidebar-width) !important; }
#sidebar.mob-open { transform: translateX(0); }
#topbar, #sidebar.collapsed ~ #topbar { left: 0 !important; }
#main, #sidebar.collapsed ~ #main { margin-left: 0 !important; }
#main, #sidebar.collapsed ~ #main { margin-left: 0 !important; padding: 14px; }
.pcard { padding: 14px; }
.stat-card { padding: 14px 16px; }
.stat-card .stat-value { font-size: 20px; }
/* Tables: scroll horizontally on small screens.
Targets both manual .table-wrap and the common .pcard.p-0 pattern. */
.table-wrap, .pcard.p-0 { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pfm-table { min-width: 560px; }
/* Hide low-priority columns */
.d-mob-none { display: none !important; }
}
.sb-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1039; }
.sb-overlay.on { display: block; }
+17 -4
View File
@@ -60,6 +60,7 @@
</div>
<!-- Table -->
{% set has_filter = search or category_id or account_id or date_from or date_to %}
<div class="pcard p-0">
{% if transactions %}
<table class="pfm-table">
@@ -120,10 +121,22 @@
{% endif %}
{% else %}
<div class="text-center py-5">
<i class="bi bi-inbox text-muted" style="font-size:2.5rem;"></i>
<p class="text-muted mt-2 mb-3">No {{ tab }} transactions found.</p>
<a href="{{ url_for('transactions.new', type=tab) }}" class="btn btn-sm btn-primary">Add {{ tab | title }}</a>
<div class="text-center py-5 px-3">
{% if has_filter %}
<i class="bi bi-funnel text-muted" style="font-size:2.5rem;opacity:.4;"></i>
<p class="fw-semibold mt-3 mb-1">No matching transactions</p>
<p class="text-muted small mb-3">Try adjusting your filters or search term.</p>
<a href="{{ url_for('transactions.index', tab=tab) }}" class="btn btn-sm btn-outline-secondary">
<i class="bi bi-x-lg me-1"></i>Clear filters
</a>
{% else %}
<i class="bi bi-arrow-left-right text-muted" style="font-size:2.5rem;opacity:.4;"></i>
<p class="fw-semibold mt-3 mb-1">No {{ tab }} transactions yet</p>
<p class="text-muted small mb-3">Record your first {{ tab }} to start tracking.</p>
<a href="{{ url_for('transactions.new', type=tab) }}" class="btn btn-sm btn-primary">
<i class="bi bi-plus-lg me-1"></i>Add {{ tab | title }}
</a>
{% endif %}
</div>
{% endif %}
</div>