From 0dacd18cefc96afad4d01202961b3990d84450dc Mon Sep 17 00:00:00 2001 From: Amolith Date: Fri, 17 Oct 2025 17:34:23 -0600 Subject: [PATCH] chore: web UI polish Fixes: bug-45aeed6 Co-authored-by: Crush --- pkg/web/templates/bug.html | 114 +++++++++++++++++++----------------- pkg/web/templates/bugs.html | 20 +++---- 2 files changed, 68 insertions(+), 66 deletions(-) diff --git a/pkg/web/templates/bug.html b/pkg/web/templates/bug.html index d80506458b063f1f10846a3d2193e08dc0c74b6d..f1d0f78d9c7447dc4f5d863efc8d6a550caa0cf7 100644 --- a/pkg/web/templates/bug.html +++ b/pkg/web/templates/bug.html @@ -7,78 +7,82 @@ +
+

+ {{if eq .Status "open"}} + + + + {{else if eq .Status "closed"}} + + + + + {{end}} + {{.Title}} +

+ {{if .Labels}} +

+ {{range $i, $label := .Labels}}{{if $i}} {{end}}{{$label.Name}}{{end}} +

+ {{end}} +
+

Timeline

{{range .Timeline}} -
- {{if eq .Type "create"}} + {{if eq .Type "create"}} +
-

- {{if eq $.Status "open"}} - - - - {{else if eq $.Status "closed"}} - - - - - {{end}} - {{$.Title}} -

+

{{.Author}} opened {{if $.Edited}} (edited){{end}}

{{if .Message}} {{.Message}} {{else}} No description provided. {{end}} -
- {{.Author}} opened this bug on - - {{if $.Edited}}(edited){{end}} -
- - {{else if eq .Type "comment"}} +
+ + {{else if eq .Type "comment"}} +
+
+

{{.Author}} commented {{if .Edited}} (edited){{end}}

+
{{if .Message}} {{.Message}} {{else}} No comment provided. {{end}} -
- {{.Author}} commented on - - {{if .Edited}}(edited){{end}} -
- - {{else if eq .Type "title"}} - {{.Author}} changed the title to {{.Title}}. -
- -
- - {{else if eq .Type "status"}} - {{.Author}} {{.Status}} the bug. -
- -
- - {{else if eq .Type "labels"}} - {{.Author}} - {{if .AddedLabels}} - added label{{if gt (len .AddedLabels) 1}}s{{end}} - {{range $i, $label := .AddedLabels}}{{if $i}}, {{end}}{{$label}}{{end}} - {{end}} - {{if and .AddedLabels .RemovedLabels}}and{{end}} - {{if .RemovedLabels}} - removed label{{if gt (len .RemovedLabels) 1}}s{{end}} - {{range $i, $label := .RemovedLabels}}{{if $i}}, {{end}}{{$label}}{{end}} - {{end}} -
- -
- {{end}}
+ + {{else if eq .Type "title"}} +
+

{{.Author}} changed the title to {{.Title}}

+
+ + {{else if eq .Type "status"}} +
+

{{.Author}} {{.Status}} the bug

+
+ + {{else if eq .Type "labels"}} +
+

+ {{.Author}} + {{if .AddedLabels}} + added label{{if gt (len .AddedLabels) 1}}s{{end}} + {{range $i, $label := .AddedLabels}}{{if $i}}, {{end}}{{$label}}{{end}} + {{end}} + {{if and .AddedLabels .RemovedLabels}} and {{end}} + {{if .RemovedLabels}} + removed label{{if gt (len .RemovedLabels) 1}}s{{end}} + {{range $i, $label := .RemovedLabels}}{{if $i}}, {{end}}{{$label}}{{end}} + {{end}} + +

+
+ {{end}} {{end}}
{{end}} diff --git a/pkg/web/templates/bugs.html b/pkg/web/templates/bugs.html index 98949929eed3df545dc1cf14a0b172ce834c05f5..d4be32be7ba3916ca3876ad86a774b9d2a714695 100644 --- a/pkg/web/templates/bugs.html +++ b/pkg/web/templates/bugs.html @@ -29,17 +29,15 @@ {{.ID}} {{.Title}} -
- by {{.Author}} on - - {{if gt .CommentCount 0}} - • {{.CommentCount}} Comments - {{end}} - {{if .HasActivity}} - • Last activity: - - {{end}} -
+ {{end}}