ui

package
v0.0.0-...-84071ac Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	PeriodType: hledger.PeriodYearly,
	StartDate:  fmt.Sprintf("%v", time.Now().Year()),
	EndDate:    "",
}

Functions

func Start

func Start(hlcmd accounting.HledgerCmd, config Config, isDebug bool)

Types

type Config

type Config struct {
	PeriodType hledger.PeriodType `json:"period"`
	StartDate  string             `json:"startDate"`
	EndDate    string             `json:"endDate"`
}

func NewConfig

func NewConfig(filename string) (Config, error)

func (*Config) UnmarshalJSON

func (c *Config) UnmarshalJSON(b []byte) error

type ContentModel

type ContentModel interface {
	tea.Model
	IsReady() bool
	SetUnready()
	SetContent(tea.Msg)
}

ContentModel extends the tea.Model interface with methods which make it possible to dynamically update the content and set the model to an "unready" status.

type Period

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

func (*Period) Update

func (p *Period) Update(msg tea.Msg)

func (*Period) View

func (p *Period) View() string

type TabItem

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

type Table

type Table struct {
	*table.Model
	// contains filtered or unexported fields
}

func (*Table) Init

func (t *Table) Init() tea.Cmd

func (*Table) IsReady

func (t *Table) IsReady() bool

func (*Table) SetColumns

func (t *Table) SetColumns(firstRow table.Row)

func (*Table) SetContent

func (t *Table) SetContent(msg tea.Msg)

func (*Table) SetHeight

func (t *Table) SetHeight(height int)

func (*Table) SetUnready

func (t *Table) SetUnready()

func (*Table) SetWidth

func (t *Table) SetWidth(width int)

func (*Table) Update

func (t *Table) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Table) View

func (t *Table) View() string

type TableData

type TableData interface {
	Columns() table.Row
	Rows() []table.Row
}

type Tabs

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

func (*Tabs) CurrentTab

func (t *Tabs) CurrentTab() TabItem

func (*Tabs) Init

func (t *Tabs) Init() tea.Cmd

func (*Tabs) Update

func (t *Tabs) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Tabs) View

func (t *Tabs) View() string

type Theme

type Theme struct {
	PrimaryBackground   lipgloss.Color
	SecondaryBackground lipgloss.Color
	PrimaryForeground   lipgloss.Color
	SecondaryForeground lipgloss.Color
	Accent              lipgloss.Color

	PrimaryColor   lipgloss.Color
	SecondaryColor lipgloss.Color
}

func ThemeNord

func ThemeNord() Theme

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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