Documentation ¶
Overview ¶
Package component contains individual components that can render themselves as HTML.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Avatar ¶
type Avatar struct { User users.User Size int // In pixels, e.g., 48. // contains filtered or unexported fields }
Avatar is an avatar component.
type ChangeBadge ¶
ChangeBadge is a change badge, displaying the change's state.
func (ChangeBadge) Render ¶
func (cb ChangeBadge) Render() []*html.Node
type ChangeEntry ¶
type ChangeEntry struct { Change change.Change Unread bool // Unread indicates whether the change contains unread notifications for authenticated user. // TODO, THINK: This is router details, can it be factored out or cleaned up? BaseURI string }
ChangeEntry is an entry within the list of changes.
func (ChangeEntry) Render ¶
func (i ChangeEntry) Render() []*html.Node
type ChangeIcon ¶
ChangeIcon is a change icon, displaying the change's state.
func (ChangeIcon) Render ¶
func (ii ChangeIcon) Render() []*html.Node
type ChangeStateBadge ¶
ChangeStateBadge is a component that displays the state of a change with a badge, who opened it, and when it was opened.
func (ChangeStateBadge) Render ¶
func (i ChangeStateBadge) Render() []*html.Node
type Changes ¶
type Changes struct { Filter change.StateFilter Entries []ChangeEntry }
Changes is a component that displays a page of changes, with a navigation bar on top.
type ChangesNav ¶
type ChangesNav struct {}
ChangesNav is a navigation component for displaying a header for a list of changes. It contains tabs to switch between viewing open and closed changes.
func (ChangesNav) Render ¶
func (n ChangesNav) Render() []*html.Node
type ClosedChangesTab ¶
type ClosedChangesTab struct {
Count uint64 // Count of closed changes.
}
ClosedChangesTab is a "Closed Changes Tab" component.
func (ClosedChangesTab) Render ¶
func (t ClosedChangesTab) Render() []*html.Node
type Event ¶
type Event struct { Event change.TimelineItem // State must have BaseURI and ChangeID fields populated. // They are used while rendering change.CommitEvent events. State common.State }
Event is an event component.
type OpenChangesTab ¶
type OpenChangesTab struct {
Count uint64 // Count of open changes.
}
OpenChangesTab is an "Open Changes Tab" component.
func (OpenChangesTab) Render ¶
func (t OpenChangesTab) Render() []*html.Node