models

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnimSparkle = iota
	AnimMatrix
	AnimWipeRight
	AnimWipeLeft
	AnimRainbow
	AnimWave
	AnimBinary
	AnimDissolve
	AnimFlip
	AnimPulse
	AnimTypewriter
	AnimParticle
	AnimRedact
	AnimChaos
	AnimConverge
	AnimBounce
	AnimSpin
	AnimZipper
	AnimEraser
	AnimGlitch
	AnimMoons
	AnimBraille
	AnimHex
	AnimReverse
	AnimCaseFlip
	AnimWide
	AnimTraffic
	AnimCenterStrike
	AnimLoading
	AnimSlider

	AnimCount = 30
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppData

type AppData struct {
	ThemeIndex int
	SortMode   SortMode
	Tasks      []Task
}

func LoadData

func LoadData() AppData

type AppState

type AppState int
const (
	StateBrowse AppState = iota
	StateEditing
	StateCreating
	StateEditingDescription
	StateCreatingDescription
)

type Model

type Model struct {
	Tasks      []Task
	State      AppState
	SortMode   SortMode
	ThemeIndex int
	LastAnim   int

	Cursor    int
	Width     int
	Height    int
	TextInput textinput.Model

	// Temporary storage for task creation
	TempTitle string
}

func (*Model) ApplySort

func (m *Model) ApplySort()

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) Save

func (m *Model) Save()

func (*Model) Update

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

func (*Model) ValidateCursor

func (m *Model) ValidateCursor()

ValidateCursor ensures the cursor is within valid bounds

func (*Model) View

func (m *Model) View() string

type SortMode

type SortMode int
const (
	SortOff SortMode = iota
	SortTodoFirst
	SortDoneFirst
)

type Task

type Task struct {
	ID          int64
	Title       string
	Description string
	Done        bool

	// UI States
	Expanded bool

	// Animation States
	IsAnimatingCheck bool
	IsDeleting       bool
	AnimType         int
	AnimStart        time.Time
}

type TickMsg

type TickMsg struct{}

Jump to

Keyboard shortcuts

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