fix: 消息页各 Tab 显示各自标题

- system Tab 显示"系统消息"
- mention Tab 显示"@艾特我的"
- like Tab 显示"点赞通知"
- follow Tab 显示"关注通知"
- all/默认 Tab 显示"全部消息"
This commit is contained in:
2026-06-02 19:39:58 +08:00
parent 0614883a4f
commit 746deca754

View File

@ -37,7 +37,7 @@
</aside>
<div class="msg-main">
<!-- 系统消息区域 -->
<!-- Tab 标题区域 -->
{{if eq .CurrentTab "system"}}
<div class="msg-system-section">
<div class="msg-system-header">
@ -46,6 +46,38 @@
</div>
<div class="msg-system-divider"></div>
</div>
{{else if eq .CurrentTab "mention"}}
<div class="msg-system-section">
<div class="msg-system-header">
<svg class="msg-system-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
@艾特我的
</div>
<div class="msg-system-divider"></div>
</div>
{{else if eq .CurrentTab "like"}}
<div class="msg-system-section">
<div class="msg-system-header">
<svg class="msg-system-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg>
点赞通知
</div>
<div class="msg-system-divider"></div>
</div>
{{else if eq .CurrentTab "follow"}}
<div class="msg-system-section">
<div class="msg-system-header">
<svg class="msg-system-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="8.5" cy="7" r="4"/><line x1="20" y1="8" x2="20" y2="14"/><line x1="23" y1="11" x2="17" y2="11"/></svg>
关注通知
</div>
<div class="msg-system-divider"></div>
</div>
{{else}}
<div class="msg-system-section">
<div class="msg-system-header">
<svg class="msg-system-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/></svg>
全部消息
</div>
<div class="msg-system-divider"></div>
</div>
{{end}}
{{if .Messages}}