fix(ui): restore brand across anonymous and error pages
giteabot / giteabot (push) Canceled after 0s
giteabot backport / giteabot (push) Canceled after 0s
release-nightly-snapcraft / build-and-publish (push) Canceled after 0s
release-nightly / nightly-binary (push) Canceled after 0s
release-nightly / nightly-container (push) Canceled after 0s

Assisted-by: Codex:GPT-5
This commit is contained in:
2026-08-29 19:14:04 +08:00
parent ab55a432ec
commit 9860c79986
8 changed files with 62 additions and 16 deletions
+5
View File
@@ -24,6 +24,11 @@ import (
const tplStatus500 templates.TplName = "status/500"
func renderServerErrorPage(w http.ResponseWriter, req *http.Request, respCode int, tmpl templates.TplName, ctxData map[string]any, plainMsg string) {
if ctxData == nil {
ctxData = map[string]any{}
}
ctxData["ShowNavbarBrand"] = true
acceptsHTML := false
for _, part := range req.Header["Accept"] {
if strings.Contains(part, "text/html") {