feat(ui): rich dashboard cards with countries and recent postcards

This commit is contained in:
2026-07-05 19:22:10 +08:00
parent 419ec47b99
commit 9decb570c2
3 changed files with 27 additions and 3 deletions

View File

@@ -7,6 +7,7 @@
{% if profiles %}
<div class="card-grid">
{% for p in profiles %}
{% set ex = extras[p.id] %}
<a href="/profiles/{{ p.id }}/postcards" class="card dashboard-card">
<div class="dc-header">
<span class="dc-icon">📮</span>
@@ -30,6 +31,21 @@
<span class="dc-label">收到</span>
</div>
</div>
{% if ex.countries %}
<div class="dc-tags">
{% for c in ex.countries %}
<span class="dc-tag">{{ c }}</span>
{% endfor %}
</div>
{% endif %}
{% if ex.recent %}
<div class="dc-recent">
<span class="dc-recent-label">最近</span>
{% for c in ex.recent %}
<span class="dc-recent-item">{{ c.card_number }}</span>
{% endfor %}
</div>
{% endif %}
</a>
{% endfor %}
</div>