todo_tree

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoSelectEntry

func AutoSelectEntry(selectedEntry models.EntryIdentity, entries []states.TreeEntry) models.EntryIdentity

auto select first if selected one is hidden

func GetIndex

func GetIndex(entries []states.TreeEntry, id models.EntryIdentity) int

func TodoItem

func TodoItem(props TodoItemProps) *dom.Node

func TodoNote

func TodoNote(props TodoNoteProps) *dom.Node

func TodoTree

func TodoTree(props TodoTreeProps) []*dom.Node

Types

type TodoItemProps

type TodoItemProps struct {
	Item       *models.LogEntryView
	Prefix     string
	IsLast     bool
	IsSelected bool
	State      *states.State

	OnNavigate func(e *dom.DOMEvent, direction int)
	OnEnter    func(e *dom.DOMEvent, entryID int64)
	// gg
	OnGoToFirst func(e *dom.DOMEvent)
	// G
	OnGoToLast func(e *dom.DOMEvent)

	// gt -> top
	OnGoToTop func(e *dom.DOMEvent)
	// gb -> bottom
	OnGoToBottom func(e *dom.DOMEvent)
}

type TodoNoteProps

type TodoNoteProps struct {
	Note       *models.NoteView
	EntryID    int64 // ID of the entry that owns this note
	Prefix     string
	IsLast     bool
	IsSelected bool
	State      *states.State

	OnNavigate func(e *dom.DOMEvent, direction int)
	OnEnter    func(e *dom.DOMEvent, entryID int64)
}

type TodoTreeProps

type TodoTreeProps struct {
	State   *states.State // The application state
	Entries []states.TreeEntry

	SelectedEntry models.EntryIdentity

	OnNavigate   func(e *dom.DOMEvent, entryType models.LogEntryViewType, entryID int64, direction int)
	OnEnter      func(e *dom.DOMEvent, entryType models.LogEntryViewType, entryID int64)
	OnGoToFirst  func(e *dom.DOMEvent)
	OnGoToLast   func(e *dom.DOMEvent)
	OnGoToTop    func(e *dom.DOMEvent)
	OnGoToBottom func(e *dom.DOMEvent)
}

TodoTreeProps contains configuration for rendering the entry tree

Jump to

Keyboard shortcuts

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