Documentation
¶
Index ¶
- Constants
- func App(state *State, window *dom.Window) *dom.Node
- func BindInput(props InputProps) *dom.Node
- func ConfirmDialog(props ConfirmDialogProps) *dom.Node
- func Menu(props MenuProps) *dom.Node
- type ConfirmDialogProps
- type InputProps
- type MenuItem
- type MenuProps
- type SelectedEntryMode
- type State
Constants ¶
View Source
const ( SelectedEntryMode_Default = iota SelectedEntryMode_Editing SelectedEntryMode_ShowActions SelectedEntryMode_DeleteConfirm )
View Source
const (
CtrlCExitDelayMs = 1000
)
Variables ¶
This section is empty.
Functions ¶
func BindInput ¶
func BindInput(props InputProps) *dom.Node
func ConfirmDialog ¶
func ConfirmDialog(props ConfirmDialogProps) *dom.Node
ConfirmDialog creates a confirmation dialog with action and cancel buttons
Types ¶
type ConfirmDialogProps ¶
type ConfirmDialogProps struct {
SelectedButton int
PromptText string // e.g., "Delete todo?"
DeleteText string // e.g., "[Delete]" or "[OK]"
CancelText string // e.g., "[Cancel]"
OnDelete func()
OnCancel func()
}
ConfirmDialogProps contains the properties for the confirmation dialog
type InputProps ¶
type InputProps struct {
Placeholder string
State *models.InputState
// contains filtered or unexported fields
}
type SelectedEntryMode ¶ added in v0.0.3
type SelectedEntryMode int
type State ¶
type State struct {
Entries []*models.EntryView
Input models.InputState
SelectedEntryIndex int
SelectedEntryMode SelectedEntryMode
SelectedInputState models.InputState
SelectedDeleteConfirmButton int
SelectedActionIndex int
EnteredEntryIndex int
Quit func()
Refresh func()
OnAdd func(string)
OnUpdate func(id int64, text string)
OnDelete func(id int64)
OnToggle func(id int64)
OnPromote func(id int64)
OnUpdateHighlight func(id int64, highlightLevel int)
OnAddNote func(id int64, text string)
LastCtrlC time.Time
}
Click to show internal directories.
Click to hide internal directories.