ui

package
v0.0.0-...-c46b31f Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROJECT_TITLE = "Project Title"
	BOARD_TITLE   = "Board Title"
	CARD_TITLE    = "Card Title"
)

output strings

Variables

View Source
var (
	BLACK              = lipgloss.Color("#000000")
	WHITE              = lipgloss.Color("#ffffff")
	RED                = lipgloss.Color("#ba3525")
	BLUE               = lipgloss.Color("#77ccee")
	YELLOW             = lipgloss.Color("#fecc00")
	GREEN              = lipgloss.Color("#0edd1e")
	DefaultBorderColor = lipgloss.Color("#fc5603")
	DoneItemColor      = lipgloss.Color("#0ff702")
)

Colors

View Source
var (
	DefaultStyle             lipgloss.Style
	EmptyStyle               lipgloss.Style
	SelectedTxtStyle         lipgloss.Style
	InputFieldStyle          lipgloss.Style
	InputNoFieldStyle        lipgloss.Style
	TextAreaStyle            lipgloss.Style
	ListStyle                lipgloss.Style
	SelectedListStyle        lipgloss.Style
	MoveStyle                lipgloss.Style
	DoneItemStyle            lipgloss.Style
	ProjectListStyle         lipgloss.Style
	ProjectListSelectedStyle lipgloss.Style
	ProjectTitle             lipgloss.Style
	CardStyle                lipgloss.Style
)

Styles

Functions

func DBToQueue

func DBToQueue() queue.Queue

Types

type Card

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

Implements tea.Model

func OpenCard

func OpenCard(kc *kanban.Card) Card

called by model_selector

func (Card) Init

func (c Card) Init() tea.Cmd

func (Card) Update

func (c Card) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Card) UpdateCard

func (c *Card) UpdateCard()

func (Card) View

func (c Card) View() string

type CardDelegate

type CardDelegate struct {
	ShowDescription bool
	Styles          CardStyles
	UpdateFunc      func(tea.Msg, *list.Model) tea.Cmd
	// contains filtered or unexported fields
}

func NewCardDelegate

func NewCardDelegate() CardDelegate

func (CardDelegate) Height

func (d CardDelegate) Height() int

func (CardDelegate) Render

func (d CardDelegate) Render(w io.Writer, l list.Model, index int, item list.Item)

func (CardDelegate) Spacing

func (d CardDelegate) Spacing() int

func (CardDelegate) Update

func (d CardDelegate) Update(msg tea.Msg, l *list.Model) tea.Cmd

type CardStyles

type CardStyles struct {
	NormalTitle lipgloss.Style
	NormalDesc  lipgloss.Style

	SelectedTitle lipgloss.Style
	SelectedDesc  lipgloss.Style
}

func NewCardStyles

func NewCardStyles() (s CardStyles)

type CheckItemStyles

type CheckItemStyles struct {
	NormalTitle       lipgloss.Style
	NormalDoneTitle   lipgloss.Style
	SelectedTitle     lipgloss.Style
	SelectedDoneTitle lipgloss.Style
}

func NewCheckItemStyles

func NewCheckItemStyles() (s CheckItemStyles)

type CheckListDelegate

type CheckListDelegate struct {
	ShowDescription bool
	Styles          CheckItemStyles
	UpdateFunc      func(tea.Msg, *list.Model) tea.Cmd
	// contains filtered or unexported fields
}

func NewCheckListDelegate

func NewCheckListDelegate() CheckListDelegate

func (CheckListDelegate) Height

func (d CheckListDelegate) Height() int

func (CheckListDelegate) Render

func (d CheckListDelegate) Render(w io.Writer, l list.Model, index int, item list.Item)

func (CheckListDelegate) Spacing

func (d CheckListDelegate) Spacing() int

func (CheckListDelegate) Update

func (d CheckListDelegate) Update(msg tea.Msg, l *list.Model) tea.Cmd

type Item

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

func (Item) Description

func (i Item) Description() string

func (Item) FilterValue

func (i Item) FilterValue() string

func (Item) Meta

func (i Item) Meta() []Meta

func (Item) Title

func (i Item) Title() string

type Label

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

Implements tea.Model

func OpenLabels

func OpenLabels(kp *kanban.Project) Label

called by model_selector

func (Label) Init

func (l Label) Init() tea.Cmd

func (Label) Update

func (l Label) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Label) View

func (l Label) View() string

type LabelItemStyles

type LabelItemStyles struct {
	NormalTitle lipgloss.Style
	NormalDesc  lipgloss.Style

	SelectedTitle lipgloss.Style
	SelectedDesc  lipgloss.Style
}

func NewLabelItemStyles

func NewLabelItemStyles() (s LabelItemStyles)

type LabelListDelegate

type LabelListDelegate struct {
	ShowDescription bool
	Styles          LabelItemStyles
	UpdateFunc      func(tea.Msg, *list.Model) tea.Cmd
	// contains filtered or unexported fields
}

func NewLabelListDelegate

func NewLabelListDelegate() LabelListDelegate

func NewUnfocusedCardLabelDelegate

func NewUnfocusedCardLabelDelegate() LabelListDelegate

func (LabelListDelegate) Height

func (d LabelListDelegate) Height() int

func (LabelListDelegate) Render

func (d LabelListDelegate) Render(w io.Writer, l list.Model, index int, item list.Item)

func (LabelListDelegate) Spacing

func (d LabelListDelegate) Spacing() int

func (LabelListDelegate) Update

func (d LabelListDelegate) Update(msg tea.Msg, l *list.Model) tea.Cmd
type Menu struct {
	// contains filtered or unexported fields
}

Implements tea.Model

func NewMenu

func NewMenu() Menu

called by model_selector

func (m Menu) Init() tea.Cmd
func (m Menu) Update(msg tea.Msg) (tea.Model, tea.Cmd)
func (m *Menu) UpdateMenu()
func (m Menu) View() string

type Meta

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

List Implement list.Item interface

type Project

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

implements tea.Model

func OpenProject

func OpenProject(kp *kanban.Project) Project

called by model_selector

func (Project) Init

func (p Project) Init() tea.Cmd

func (Project) Update

func (p Project) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Project) UpdateProject

func (p *Project) UpdateProject()

func (Project) View

func (p Project) View() string

type Selector

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

Implements tea.Model

func New

func New() Selector

called by main

func (Selector) Init

func (s Selector) Init() tea.Cmd

func (*Selector) QueueToKanban

func (s *Selector) QueueToKanban(q queue.Queue)

func (Selector) Update

func (s Selector) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Selector) View

func (s Selector) View() string

type UnfocusedCardDelegate

type UnfocusedCardDelegate struct {
	ShowDescription bool
	Styles          UnfocusedCardStyles
	UpdateFunc      func(tea.Msg, *list.Model) tea.Cmd
	// contains filtered or unexported fields
}

func NewUnfocusedCardDelegate

func NewUnfocusedCardDelegate() UnfocusedCardDelegate

func (UnfocusedCardDelegate) Height

func (d UnfocusedCardDelegate) Height() int

func (UnfocusedCardDelegate) Render

func (d UnfocusedCardDelegate) Render(w io.Writer, l list.Model, index int, item list.Item)

func (UnfocusedCardDelegate) Spacing

func (d UnfocusedCardDelegate) Spacing() int

func (UnfocusedCardDelegate) Update

func (d UnfocusedCardDelegate) Update(msg tea.Msg, l *list.Model) tea.Cmd

type UnfocusedCardStyles

type UnfocusedCardStyles struct {
	NormalTitle lipgloss.Style
	NormalDesc  lipgloss.Style

	SelectedTitle lipgloss.Style
	SelectedDesc  lipgloss.Style
}

func NewUnfocusedCardStyles

func NewUnfocusedCardStyles() (s UnfocusedCardStyles)

type UnfocusedCheckItemStyles

type UnfocusedCheckItemStyles struct {
	NormalTitle       lipgloss.Style
	NormalDoneTitle   lipgloss.Style
	SelectedTitle     lipgloss.Style
	SelectedDoneTitle lipgloss.Style
}

func NewUnfocusedCheckItemStyles

func NewUnfocusedCheckItemStyles() (s UnfocusedCheckItemStyles)

type UnfocusedCheckListDelegate

type UnfocusedCheckListDelegate struct {
	ShowDescription bool
	Styles          UnfocusedCheckItemStyles
	UpdateFunc      func(tea.Msg, *list.Model) tea.Cmd
	// contains filtered or unexported fields
}

func NewUnfocusedCheckListDelegate

func NewUnfocusedCheckListDelegate() UnfocusedCheckListDelegate

func (UnfocusedCheckListDelegate) Height

func (d UnfocusedCheckListDelegate) Height() int

func (UnfocusedCheckListDelegate) Render

func (d UnfocusedCheckListDelegate) Render(w io.Writer, l list.Model, index int, item list.Item)

func (UnfocusedCheckListDelegate) Spacing

func (d UnfocusedCheckListDelegate) Spacing() int

func (UnfocusedCheckListDelegate) Update

func (d UnfocusedCheckListDelegate) Update(msg tea.Msg, l *list.Model) tea.Cmd

type WindowSize

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

Window

Jump to

Keyboard shortcuts

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