fix: 修复访客视图 PostCount 字段引用错误

- 访客视图 .SpaceUser.PostCount -> .PostCount,与 Owner 视图保持一致
- PostCount 由 Controller 作为顶层字段传入,不在 SpaceUser 对象中
This commit is contained in:
2026-06-02 15:22:57 +08:00
parent 166e01c7c3
commit 9b315c11cd

View File

@ -96,7 +96,7 @@
class="space-tab{{if eq .ActiveTab "articles"}} active{{end}}">
<svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"/></svg>
文章
<span class="tab-count">{{.SpaceUser.PostCount}}</span>
<span class="tab-count">{{.PostCount}}</span>
</a>
<a href="/space/{{.SpaceUser.ID}}?tab=following"
class="space-tab{{if or (eq .ActiveTab "following") (eq .ActiveTab "followers")}} active{{end}}">