restrict v9
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user