feat(postcards): add notes field to postcards with edit, detail, and truncated list display

This commit is contained in:
2026-07-06 21:07:28 +08:00
parent f6db3a4f55
commit 68c88a7910
6 changed files with 16 additions and 0 deletions

View File

@@ -44,6 +44,7 @@
<span>{{ pc.country|flag }} {{ pc.country or '-' }}</span>
<span>→ {{ pc.recipient_name or '-' }}</span>
</div>
{% if pc.notes %}<span class="postcard-row-notes">{{ pc.notes[:50] }}{% if pc.notes|length > 50 %}…{% endif %}</span>{% endif %}
<span class="badge badge-{{ pc.status }}">{{ {'sent':'已寄出','delivered':'已送达'}.get(pc.status) }}</span>
<span class="postcard-row-date">
{% if pc.send_time %}{{ pc.send_time.strftime('%Y-%m-%d') }}寄出{% endif %}
@@ -80,6 +81,7 @@
<div class="postcard-row-detail">
<span>← {{ pc.sender_name or '-' }}</span>
</div>
{% if pc.notes %}<span class="postcard-row-notes">{{ pc.notes[:50] }}{% if pc.notes|length > 50 %}…{% endif %}</span>{% endif %}
{% if pc.receive_time %}<span class="postcard-row-date">{{ pc.receive_time.strftime('%Y-%m-%d') }}收到</span>{% endif %}
</div>
</a>