forms

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectAllTags

func CollectAllTags(projectIDs []string, listTasks func(projectID string) ([]types.Task, error)) []string

CollectAllTags fetches tags from all projects concurrently with a concurrency limit. listTasks is a function that fetches tasks for a project ID.

func RunConfirm

func RunConfirm(title, description string) (bool, error)

RunConfirm displays a styled confirmation prompt.

Types

type ProjectFormResult

type ProjectFormResult struct {
	Name     string
	Color    string
	ViewMode string
	Kind     string
}

ProjectFormResult holds the values collected from the project form.

func RunProjectCreateForm

func RunProjectCreateForm(t theme.Theme, defaults ProjectFormResult) (*ProjectFormResult, error)

RunProjectCreateForm displays an interactive project creation form.

type TaskFormResult

type TaskFormResult struct {
	Title          string
	Content        string
	Priority       task.Priority
	Date           string
	Tags           string
	Project        string // selected project ID
	NewProjectName string // set when user chose to create a new project
}

TaskFormResult holds the values collected from the task creation form.

func RunTaskCreateForm

func RunTaskCreateForm(t theme.Theme, defaults TaskFormResult, projects []types.Project, knownTags []string) (*TaskFormResult, error)

RunTaskCreateForm displays an interactive task creation form using Huh. projects is optional — when provided, a project selector is shown. knownTags is optional — when provided, a multi-select for tags is shown.

func RunTaskUpdateForm

func RunTaskUpdateForm(t theme.Theme, defaults TaskFormResult, knownTags []string) (*TaskFormResult, error)

RunTaskUpdateForm displays an interactive task update form.

Jump to

Keyboard shortcuts

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