Documentation ¶
Index ¶
Constants ¶
const ColorSpinner = "#3465A4"
ColorSpinner defines the foreground color for the spinner.
Variables ¶
var Spinner = spinner.Spinner{ Frames: []string{"◢ ", "◣ ", "◤ ", "◥ "}, FPS: time.Second / 5, }
Spinner defines the spinner model animation.
Functions ¶
func FormatView ¶
FormatView formats a model view padding and indentation.
Types ¶
type Events ¶
type Events struct {
// contains filtered or unexported fields
}
Events defines a model for events. The model renders a view that prints all received events one after the other. Status events are displayed with a spinner and removed from the list once they finish.
func (*Events) ClearEvents ¶
func (m *Events) ClearEvents()
type StatusEvents ¶
type StatusEvents struct {
// contains filtered or unexported fields
}
StatusEvents defines a model for status events. The model renders a view that can be divided in three sections. The first one displays the "static" events which are the ones that are not status events. The second section displays a spinner with the status event that is in progress, and the third one displays a list with the past status events.
func NewStatusEvents ¶
func NewStatusEvents(bus events.Provider, maxHistory int) StatusEvents
NewStatusEvents returns a new events model.
func (*StatusEvents) ClearEvents ¶
func (m *StatusEvents) ClearEvents()
func (StatusEvents) Update ¶
func (m StatusEvents) Update(msg tea.Msg) (StatusEvents, tea.Cmd)
func (StatusEvents) View ¶
func (m StatusEvents) View() string
func (StatusEvents) Wait ¶
func (m StatusEvents) Wait() tea.Cmd
func (StatusEvents) WaitEvent ¶
func (m StatusEvents) WaitEvent() tea.Msg