feat: inline rename for profiles, dashboard stats grid UI

This commit is contained in:
2026-07-05 19:03:48 +08:00
parent d7850d200f
commit ee655be7d4
3 changed files with 56 additions and 13 deletions

View File

@@ -2,20 +2,34 @@
{% block title %}Dashboard - Postcard Manager{% endblock %}
{% block content %}
<h1>👋 欢迎,{{ user.username }}</h1>
<section class="section">
<div class="section-header">
<h2>Profiles</h2>
<h2>我的 Profiles</h2>
<a href="/profiles" class="btn btn-sm">管理 Profiles</a>
</div>
{% if profiles %}
<div class="card-grid">
{% for p in profiles %}
<a href="/profiles/{{ p.id }}/postcards" class="card">
<a href="/profiles/{{ p.id }}/postcards" class="card dashboard-card">
<h3>{{ p.nickname }}</h3>
<div class="stats">
<span class="stat">📬 {{ stats[p.id].total }}</span>
<span class="stat sent">寄出 {{ stats[p.id].sent }}</span>
<span class="stat delivered">送达 {{ stats[p.id].delivered }}</span>
<span class="stat received">收到 {{ stats[p.id].received }}</span>
<div class="stats-grid">
<div class="stat-item">
<span class="stat-num">{{ stats[p.id].total }}</span>
<span class="stat-label">总计</span>
</div>
<div class="stat-item">
<span class="stat-num stat-sent">{{ stats[p.id].sent }}</span>
<span class="stat-label">寄出</span>
</div>
<div class="stat-item">
<span class="stat-num stat-delivered">{{ stats[p.id].delivered }}</span>
<span class="stat-label">送达</span>
</div>
<div class="stat-item">
<span class="stat-num stat-received">{{ stats[p.id].received }}</span>
<span class="stat-label">收到</span>
</div>
</div>
</a>
{% endfor %}