feat(dashboard): mobile 2-col stats, add relative time to recent activity
This commit is contained in:
@@ -84,6 +84,18 @@
|
||||
{% else %}
|
||||
<span>← {{ pc.sender_name or '-' }}</span>
|
||||
{% endif %}
|
||||
<span class="recent-time">
|
||||
{% if pc.status == 'sent' and pc.send_time %}
|
||||
{% set delta = (now.date() - pc.send_time.date()).days %}
|
||||
{% if delta == 0 %}今天{% elif delta == 1 %}昨天{% else %}{{ delta }}天前{% endif %}
|
||||
{% elif pc.status == 'delivered' and pc.arrival_time %}
|
||||
{% set delta = (now.date() - pc.arrival_time.date()).days %}
|
||||
{% if delta == 0 %}今天{% elif delta == 1 %}昨天{% else %}{{ delta }}天前{% endif %}
|
||||
{% elif pc.status == 'received' and pc.receive_time %}
|
||||
{% set delta = (now.date() - pc.receive_time.date()).days %}
|
||||
{% if delta == 0 %}今天{% elif delta == 1 %}昨天{% else %}{{ delta }}天前{% endif %}
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user