ui

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActiveTaskPlaceholder     = "{{task}}"
	ActiveTaskTimePlaceholder = "{{time}}"
)

Variables

View Source
var (
	WarningStyle = lipgloss.NewStyle().
		Foreground(lipgloss.Color(warningColor))
)

Functions

func GenerateData added in v0.2.0

func GenerateData(db *sql.DB, numDays, numTasks uint8) error

func RenderReport

func RenderReport(db *sql.DB, writer io.Writer, plain bool, period string, agg bool, interactive bool) error

func RenderStats

func RenderStats(db *sql.DB, writer io.Writer, plain bool, period string, interactive bool) error

func RenderTaskLog

func RenderTaskLog(db *sql.DB, writer io.Writer, plain bool, period string, interactive bool) error

func RenderUI

func RenderUI(db *sql.DB) error

func ShowActiveTask

func ShowActiveTask(db *sql.DB, writer io.Writer, template string) error

Types

type Model added in v0.4.0

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

func InitialModel

func InitialModel(db *sql.DB) Model

func (Model) Init added in v0.4.0

func (m Model) Init() tea.Cmd

func (Model) Update added in v0.4.0

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View added in v0.4.0

func (m Model) View() string

Jump to

Keyboard shortcuts

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