Documentation
¶
Overview ¶
Package tui provides the text user interface for the claro CLI tool.
Package tui provides the text user interface for the claro CLI tool.
Package tui provides the text user interface for the claro CLI tool.
Package tui provides the text user interface for the claro CLI tool.
Index ¶
- Constants
- Variables
- func FormatList(l list.Model, title string) list.Model
- func LongHelpMsg(shortHelpMsg string) string
- func MakeAssignmentsList(listA AssignmentsList) []list.Item
- func MakeClassroomList(listC ClassroomList) []list.Item
- func UseErrorMsg(cmdName string) string
- type AssignmentDirError
- type AssignmentsList
- type ClaroStyles
- type ClassroomList
- type ErrorMsg
- type ErrorPullMsg
- type Item
- type ItemDelegate
- type KeyMap
- type NewCommits
- type SuccessfullMsg
- type SuccessfullPullMsg
Constants ¶
View Source
const (
DefaultWidth = 80
)
Variables ¶
View Source
var ( CurrentRepositoryStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("211")) DoneStyle = lipgloss.NewStyle().Margin(1, 2) TextStyle = lipgloss.NewStyle().Margin(1, 2) ErrorStyle = lipgloss.NewStyle().Margin(1, 2).Foreground(lipgloss.AdaptiveColor{Light: "#FF2D27", Dark: "#FF644E"}) CheckMark = lipgloss.NewStyle().Foreground(lipgloss.Color("42")).SetString("✓") BowtieMark = lipgloss.NewStyle().Foreground(lipgloss.Color("#F8BA00")).SetString("⧖") ErrorMark = lipgloss.NewStyle().Foreground(lipgloss.Color("#FF2D27")).SetString("𐄂") )
View Source
var GitHubCliInstalled bool
View Source
var UserGitHubPAT string
Functions ¶
func FormatList ¶
FormatList formats a list using the claro default styles
func LongHelpMsg ¶
func MakeAssignmentsList ¶
func MakeAssignmentsList(listA AssignmentsList) []list.Item
MakeAssignmentsList creates a list of assignments
func MakeClassroomList ¶
func MakeClassroomList(listC ClassroomList) []list.Item
MakeClassroomList creates a list of classrooms
func UseErrorMsg ¶
Types ¶
type AssignmentDirError ¶
type AssignmentDirError string
type AssignmentsList ¶
type AssignmentsList []classroom.Assignment
type ClaroStyles ¶
type ClaroStyles struct { Title lipgloss.Style Item lipgloss.Style SelectedItem lipgloss.Style Pagination lipgloss.Style Help lipgloss.Style QuitText lipgloss.Style ErrorText lipgloss.Style NormalText lipgloss.Style }
ClaroStyles represents the styles used in the Claro TUI
func CreateDefaultStyles ¶
func CreateDefaultStyles() (s ClaroStyles)
CreateDefaultStyles creates the default styles for the Claro TUI
type ClassroomList ¶
type ErrorPullMsg ¶
type ErrorPullMsg string
type ItemDelegate ¶
type ItemDelegate struct {
// contains filtered or unexported fields
}
ItemDelegate represents the delegate for the list
func NewItemDelegate ¶
func NewItemDelegate(styles *ClaroStyles, keys *KeyMap) *ItemDelegate
NewItemDelegate creates a new ItemDelegate
func (ItemDelegate) Height ¶
func (d ItemDelegate) Height() int
func (ItemDelegate) Spacing ¶
func (d ItemDelegate) Spacing() int
type NewCommits ¶
type NewCommits string
type SuccessfullMsg ¶
type SuccessfullMsg string
type SuccessfullPullMsg ¶
type SuccessfullPullMsg string
Click to show internal directories.
Click to hide internal directories.