fix v14
This commit is contained in:
@@ -17,6 +17,7 @@ import (
|
||||
"github.com/tamakyi/TamaBox/internal/context"
|
||||
"github.com/tamakyi/TamaBox/internal/db"
|
||||
"github.com/tamakyi/TamaBox/internal/dbutil"
|
||||
"github.com/tamakyi/TamaBox/internal/i18n"
|
||||
)
|
||||
|
||||
type conversationDetail struct {
|
||||
@@ -370,6 +371,8 @@ func QuestionList(ctx context.Context) {
|
||||
logrus.WithContext(ctx.Request().Context()).WithError(rErr).Error("Failed to query active restriction")
|
||||
} else if level != "" {
|
||||
ctx.Data["RestrictionLevel"] = string(level)
|
||||
// 条幅里给「人话」而不是裸 L2:箱主看不懂级别代号,只会以为被打了个莫名其妙的标记。
|
||||
ctx.Data["RestrictionLevelName"] = i18n.T(ctx.Lang(), "restriction.level."+string(level))
|
||||
if active != nil {
|
||||
ctx.Data["RestrictionExpiresAt"] = active.ExpiresAt.Format("2006-01-02")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user