feat(ui): show send/receive date in postcard list

This commit is contained in:
2026-07-05 23:06:18 +08:00
parent 61190328a4
commit 90c02faa8f
2 changed files with 3 additions and 0 deletions

View File

@@ -213,6 +213,7 @@ code { background: var(--bg); padding: .15rem .4rem; border-radius: 4px; font-si
.postcard-row-info strong { white-space: nowrap; } .postcard-row-info strong { white-space: nowrap; }
.postcard-row-info span { white-space: nowrap; color: var(--text-muted); } .postcard-row-info span { white-space: nowrap; color: var(--text-muted); }
.postcard-row-action { flex-shrink: 0; } .postcard-row-action { flex-shrink: 0; }
.postcard-row-date { font-size: .78rem; color: var(--text-muted); white-space: nowrap; }
/* Filter */ /* Filter */
.filter-bar { margin-bottom: 1.25rem; } .filter-bar { margin-bottom: 1.25rem; }

View File

@@ -38,6 +38,7 @@
<span>{{ pc.country|flag }} {{ pc.country or '-' }}</span> <span>{{ pc.country|flag }} {{ pc.country or '-' }}</span>
<span>→ {{ pc.recipient_name or '-' }}</span> <span>→ {{ pc.recipient_name or '-' }}</span>
<span class="badge badge-{{ pc.status }}">{{ {'sent':'已寄出','delivered':'已送达'}.get(pc.status) }}</span> <span class="badge badge-{{ pc.status }}">{{ {'sent':'已寄出','delivered':'已送达'}.get(pc.status) }}</span>
{% if pc.send_time %}<span class="postcard-row-date">{{ pc.send_time.strftime('%Y-%m-%d') }}寄出</span>{% endif %}
</div> </div>
<div class="postcard-row-action"> <div class="postcard-row-action">
{% if pc.status == 'sent' %} {% if pc.status == 'sent' %}
@@ -67,6 +68,7 @@
<div class="postcard-row-info"> <div class="postcard-row-info">
<strong>{{ pc.card_number }}</strong> <strong>{{ pc.card_number }}</strong>
<span>← {{ pc.sender_name or '-' }}</span> <span>← {{ pc.sender_name or '-' }}</span>
{% if pc.receive_time %}<span class="postcard-row-date">{{ pc.receive_time.strftime('%Y-%m-%d') }}收到</span>{% endif %}
</div> </div>
</a> </a>
{% endfor %} {% endfor %}