ui

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Header
	HeaderStyle = lipgloss.NewStyle().
				Foreground(white).
				Background(purple).
				Bold(true).
				Padding(0, 2)

	HeaderTitleStyle = lipgloss.NewStyle().
						Foreground(white).
						Bold(true).
						Padding(0, 1)

	HeaderInfoStyle = lipgloss.NewStyle().
					Foreground(lipgloss.Color("#DDD6FE")).
					Padding(0, 1)

	// Logo
	LogoStyle = lipgloss.NewStyle().
				Foreground(purple).
				Bold(true)

	LogoSubStyle = lipgloss.NewStyle().
					Foreground(violet)

	// Card
	CardStyle = lipgloss.NewStyle().
				Border(lipgloss.RoundedBorder()).
				BorderForeground(darkGray).
				Padding(1, 2).
				Margin(0, 0, 1, 0)

	CardHighlightStyle = lipgloss.NewStyle().
						Border(lipgloss.RoundedBorder()).
						BorderForeground(purple).
						Padding(1, 2).
						Margin(0, 0, 1, 0)

	// Text styles
	TitleStyle = lipgloss.NewStyle().
				Foreground(violet).
				Bold(true)

	SubtitleStyle = lipgloss.NewStyle().
					Foreground(cyan).
					Bold(true)

	MutedStyle = lipgloss.NewStyle().
				Foreground(muted)

	BoldStyle = lipgloss.NewStyle().
				Foreground(white).
				Bold(true)

	// Status
	SuccessStyle = lipgloss.NewStyle().
					Foreground(green).
					Bold(true)

	WarningStyle = lipgloss.NewStyle().
					Foreground(yellow).
					Bold(true)

	DangerStyle = lipgloss.NewStyle().
				Foreground(red).
				Bold(true)

	InfoStyle = lipgloss.NewStyle().
				Foreground(cyan).
				Bold(true)

	// Menu
	MenuItemStyle = lipgloss.NewStyle().
					Foreground(white).
					Padding(0, 2)

	MenuItemSelectedStyle = lipgloss.NewStyle().
							Foreground(white).
							Background(purple).
							Bold(true).
							Padding(0, 2)

	MenuItemIconStyle = lipgloss.NewStyle().
						Foreground(violet)

	// Input
	InputLabelStyle = lipgloss.NewStyle().
					Foreground(cyan).
					Bold(true)

	InputFocusedStyle = lipgloss.NewStyle().
						Border(lipgloss.RoundedBorder()).
						BorderForeground(purple).
						Padding(0, 1)

	InputBlurredStyle = lipgloss.NewStyle().
						Border(lipgloss.RoundedBorder()).
						BorderForeground(darkGray).
						Padding(0, 1)

	// Help
	HelpStyle = lipgloss.NewStyle().
				Foreground(gray).
				Padding(1, 2)

	// Separator
	SepStyle = lipgloss.NewStyle().
				Foreground(darkGray)

	// Status bar
	StatusBarStyle = lipgloss.NewStyle().
					Foreground(muted).
					Padding(0, 2)

	// Page title
	PageTitleStyle = lipgloss.NewStyle().
					Foreground(white).
					Background(violet).
					Bold(true).
					Padding(0, 2).
					Margin(0, 0, 1, 0)

	// Badge
	BadgeGreenStyle = lipgloss.NewStyle().
					Foreground(bgDark).
					Background(green).
					Bold(true).
					Padding(0, 1)

	BadgeRedStyle = lipgloss.NewStyle().
					Foreground(bgDark).
					Background(red).
					Bold(true).
					Padding(0, 1)

	BadgeYellowStyle = lipgloss.NewStyle().
						Foreground(bgDark).
						Background(yellow).
						Bold(true).
						Padding(0, 1)

	BadgeBlueStyle = lipgloss.NewStyle().
					Foreground(bgDark).
					Background(blue).
					Bold(true).
					Padding(0, 1)
)

Functions

func AbsenceBar added in v1.0.2

func AbsenceBar(usedPct float64, width int) string

AbsenceBar renders a bar that fills as absences increase (green→yellow→red)

func ProgressBar

func ProgressBar(percent float64, width int) string

ProgressBar renders a simple colored progress bar

func QuickFaltas

func QuickFaltas(diaries []api.Diary, semestre string) string

QuickFaltas prints attendance status per subject

func QuickMsgs added in v1.0.2

func QuickMsgs(msgs *api.MessagesResponse, semestre string) string

QuickMsgs prints unread messages

func QuickNotas

func QuickNotas(diaries []api.Diary, academic *api.AcademicData, semestre string) string

QuickNotas prints grades per subject

func QuickPerfil added in v1.0.2

func QuickPerfil(academic *api.AcademicData, completion *api.CompletionReqs, matricula, semestre string) string

QuickPerfil prints the academic profile

func QuickStatus

func QuickStatus(diaries []api.Diary, academic *api.AcademicData, msgs *api.MessagesResponse, semestre, matricula string) string

QuickStatus prints a quick overview

func QuickToday

func QuickToday(diaries []api.Diary, semestre string) string

QuickToday prints today's classes without opening TUI

func QuickWeek

func QuickWeek(diaries []api.Diary, semestre string) string

QuickWeek prints the week schedule

func RenderAbsences

func RenderAbsences(diaries []api.Diary, width int) string

func RenderGrades

func RenderGrades(diaries []api.Diary, academic *api.AcademicData, width int) string

func RenderNotifications

func RenderNotifications(msgs *api.MessagesResponse, width int) string

func RenderProfile

func RenderProfile(academic *api.AcademicData, completion *api.CompletionReqs, matricula string, width int) string

func RenderToday

func RenderToday(diaries []api.Diary, width int) string

func RenderUserInfo

func RenderUserInfo(academic *api.AcademicData, matricula string, width int) string

func RenderWeek

func RenderWeek(diaries []api.Diary, width int) string

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func NewApp

func NewApp() *App

func (*App) Init

func (a *App) Init() tea.Cmd

func (*App) Update

func (a *App) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*App) View

func (a *App) View() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL