dmitri.shuralyov.com/app/changes

add support for change.CommitEvent

Visualize the new event type in the change timeline.

Follows https://dmitri.shuralyov.com/service/change$commit/bd27112db59ba9f1e01f6d1e36ea7715c9dde98c.
dmitshur committed 5 years ago commit 99913882f9aa457908d5a24a124159a0ef711981
Showing partial commit. Full Commit
Collapse all
main.go
@@ -666,11 +666,11 @@ func loadTemplates(state common.State, bodyPre string) (*template.Template, erro
		},

		"render": func(c htmlg.Component) template.HTML {
			return template.HTML(htmlg.Render(c.Render()...))
		},
		"event":            func(e change.TimelineItem) htmlg.Component { return component.Event{Event: e} },
		"event":            func(e change.TimelineItem) htmlg.Component { return component.Event{Event: e, State: state} },
		"changeStateBadge": func(c change.Change) htmlg.Component { return component.ChangeStateBadge{Change: c} },
		"time":             func(t time.Time) htmlg.Component { return component.Time{Time: t} },
		"user":             func(u users.User) htmlg.Component { return component.User{User: u} },
		"avatar":           func(u users.User) htmlg.Component { return component.Avatar{User: u, Size: 48} },
	})