daily

package
v2.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPath

func GetPath() string

func Shorten

func Shorten(s string, maxLen int) string

func TaskToItems

func TaskToItems(tasks []Task) []list.Item

func WriteItems

func WriteItems(tasks []Task)

Types

type Daily

type Daily struct {
	Width     int
	Height    int
	List      list.Model
	Tasks     []Task
	Popup     *taskpopup.TaskPopup
	ShowPopup bool
	Keymap    keymap.DailyTaskMap
	Help      help.Model
}

func NewDaily

func NewDaily(w int, h int) *Daily

func (Daily) CreateTask

func (m Daily) CreateTask(msg messages.TaskPopupMessage, isUnique bool)

func (Daily) DeleteTask

func (m Daily) DeleteTask(msg messages.TaskPopupMessage)

func (Daily) EditTask

func (m Daily) EditTask(msg messages.TaskPopupMessage)

func (*Daily) Init

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

func (*Daily) Refresh

func (m *Daily) Refresh()

func (Daily) StatusChangeTask

func (m Daily) StatusChangeTask(msg messages.TaskPopupMessage)

func (*Daily) Update

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

func (*Daily) View

func (m *Daily) View() string

type Task

type Task struct {
	TaskTitle string           `csv:"title"`
	TaskDesc  string           `csv:"desc"`
	Status    enums.TaskStatus `csv:"status"`
	// We will not store these data in the file
	ID       int            `csv:"-"` // Point to index in the respective type array
	TaskType enums.TaskType `csv:"-"`
}

func GetItems

func GetItems() []Task

func (Task) Description

func (m Task) Description() string

func (Task) FilterValue

func (m Task) FilterValue() string

func (Task) Title

func (m Task) Title() string

type TaskDelegate

type TaskDelegate struct{}

func (TaskDelegate) Height

func (d TaskDelegate) Height() int

func (TaskDelegate) Render

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

func (TaskDelegate) Spacing

func (d TaskDelegate) Spacing() int

func (TaskDelegate) Update

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

Jump to

Keyboard shortcuts

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