restrict v9

This commit is contained in:
tamakyi
2026-10-18 23:48:57 +08:00
parent 7a6417c33d
commit 7e0e1cba49
5 changed files with 38 additions and 3 deletions
+1 -1
View File
@@ -8,5 +8,5 @@ import (
"embed"
)
//go:embed auth base mail question user chat vote home.html about-me.html sponsor.html change-logs.html pixel.html maintenance-mode.html
//go:embed auth base mail question user chat vote home.html about-me.html sponsor.html rules.html change-logs.html pixel.html maintenance-mode.html
var FS embed.FS
+3
View File
@@ -339,6 +339,9 @@ func TestRenderUserQuestionList(t *testing.T) {
QuestionID uint
IsPinned bool
PinLink string
// ReportCount 对应线上的 receivedItem(箱主列表的「被举报 N 次」标记)。
// 这里漏掉会让 question-list 模板在 range 时取字段失败。
ReportCount int64
}
type mockConv struct {
Token string
+1 -1
View File
@@ -273,7 +273,7 @@
{{ if not .IsAnswered }}
<span class="uk-label qlist-pill" title="{{t $.LangCode "qlist.unanswered"}}"><span class="tb-short">{{t $.LangCode "qlist.unansweredShort"}}</span><span class="tb-text">{{t $.LangCode "qlist.unanswered"}}</span></span>
{{ end }}
{{ if gt .ReportCount 0 }}
{{ if .ReportCount }}
<span class="uk-label uk-label-danger qlist-pill" title="{{t $.LangCode "qlist.reported" .ReportCount}}"><span class="tb-short">{{t $.LangCode "qlist.reportedShort" .ReportCount}}</span><span class="tb-text">{{t $.LangCode "qlist.reported" .ReportCount}}</span></span>
{{ end }}
{{ if .IsRead }}