model

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppVersion = "dev"

AppVersion is set from main.go

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App is the main application model

func NewApp

func NewApp() App

NewApp creates a new App model

func (App) Init

func (a App) Init() tea.Cmd

Init initializes the application

func (App) Update

func (a App) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages

func (App) View

func (a App) View() string

View renders the application

type BackFromGroupsMsg

type BackFromGroupsMsg struct{}

type BackToProjectsMsg

type BackToProjectsMsg struct{}

type BackToTasksMsg

type BackToTasksMsg struct{}

type CancelEditMsg

type CancelEditMsg struct{}

type CancelGroupEditMsg

type CancelGroupEditMsg struct{}

type DetailModel

type DetailModel struct {
	// contains filtered or unexported fields
}

DetailModel handles the task detail screen

func NewDetailModel

func NewDetailModel(task *data.Task, taskStore *data.TaskStore, groupStore *data.GroupStore) DetailModel

NewDetailModel creates a new DetailModel

func (DetailModel) Init

func (m DetailModel) Init() tea.Cmd

Init initializes the model

func (DetailModel) Update

func (m DetailModel) Update(msg tea.Msg) (DetailModel, tea.Cmd)

Update handles messages

func (DetailModel) View

func (m DetailModel) View() string

View renders the task detail screen

type EditGroupMsg

type EditGroupMsg struct {
	Group *data.TaskGroup
	IsNew bool
}

type EditModel

type EditModel struct {
	// contains filtered or unexported fields
}

EditModel handles the task edit/create screen

func NewEditModel

func NewEditModel(task *data.Task, taskStore *data.TaskStore, groupStore *data.GroupStore, isNew bool) EditModel

NewEditModel creates a new EditModel

func (EditModel) Init

func (m EditModel) Init() tea.Cmd

Init initializes the model

func (*EditModel) SetSize added in v1.5.1

func (m *EditModel) SetSize(width, height int)

SetSize updates the model dimensions and input widths

func (EditModel) Update

func (m EditModel) Update(msg tea.Msg) (EditModel, tea.Cmd)

Update handles messages

func (EditModel) View

func (m EditModel) View() string

View renders the edit screen

type EditTaskMsg

type EditTaskMsg struct {
	Task *data.Task
}

type GroupEditModel

type GroupEditModel struct {
	// contains filtered or unexported fields
}

GroupEditModel handles the group edit dialog

func NewGroupEditModel

func NewGroupEditModel(group *data.TaskGroup, groupStore *data.GroupStore, isNew bool) GroupEditModel

NewGroupEditModel creates a new GroupEditModel

func (GroupEditModel) Init

func (m GroupEditModel) Init() tea.Cmd

Init initializes the model

func (GroupEditModel) Update

func (m GroupEditModel) Update(msg tea.Msg) (GroupEditModel, tea.Cmd)

Update handles messages

func (GroupEditModel) View

func (m GroupEditModel) View() string

View renders the group edit dialog

type GroupSavedMsg

type GroupSavedMsg struct {
	Store *data.GroupStore
}

type GroupsModel

type GroupsModel struct {
	// contains filtered or unexported fields
}

GroupsModel handles the group management screen

func NewGroupsModel

func NewGroupsModel(groupStore *data.GroupStore) GroupsModel

NewGroupsModel creates a new GroupsModel

func (GroupsModel) Init

func (m GroupsModel) Init() tea.Cmd

Init initializes the model

func (GroupsModel) Update

func (m GroupsModel) Update(msg tea.Msg) (GroupsModel, tea.Cmd)

Update handles messages

func (GroupsModel) View

func (m GroupsModel) View() string

View renders the group management screen

type ManageGroupsMsg

type ManageGroupsMsg struct{}

type NewTaskMsg

type NewTaskMsg struct{}

type NextTaskMsg added in v1.5.2

type NextTaskMsg struct {
	CurrentID string
}

type PrevTaskMsg added in v1.5.2

type PrevTaskMsg struct {
	CurrentID string
}

type ProjectsModel

type ProjectsModel struct {
	// contains filtered or unexported fields
}

ProjectsModel handles the project selection screen

func NewProjectsModel

func NewProjectsModel() ProjectsModel

NewProjectsModel creates a new ProjectsModel

func (ProjectsModel) Init

func (m ProjectsModel) Init() tea.Cmd

Init initializes the model and loads projects

func (ProjectsModel) Update

func (m ProjectsModel) Update(msg tea.Msg) (ProjectsModel, tea.Cmd)

Update handles messages

func (ProjectsModel) View

func (m ProjectsModel) View() string

View renders the project selection screen

type RefreshMsg

type RefreshMsg struct{}

type Screen

type Screen int

Screen represents the current screen

const (
	ScreenProjects Screen = iota
	ScreenTasks
	ScreenDetail
	ScreenEdit
	ScreenGroups
	ScreenGroupEdit
)

type SelectProjectMsg

type SelectProjectMsg struct {
	Name string
}

type TaskSavedMsg

type TaskSavedMsg struct {
	Store *data.TaskStore
}

type TasksModel

type TasksModel struct {
	// contains filtered or unexported fields
}

TasksModel handles the task list screen

func NewTasksModel

func NewTasksModel(projectName string, taskStore *data.TaskStore, groupStore *data.GroupStore) TasksModel

NewTasksModel creates a new TasksModel

func (*TasksModel) GetAdjacentTask added in v1.5.2

func (m *TasksModel) GetAdjacentTask(currentID string, direction int) *data.Task

GetAdjacentTask returns the next or previous task from the current task ID direction: 1 for next, -1 for previous

func (TasksModel) Init

func (m TasksModel) Init() tea.Cmd

Init initializes the model

func (*TasksModel) ReloadData added in v1.2.0

func (m *TasksModel) ReloadData(taskStore *data.TaskStore, groupStore *data.GroupStore)

ReloadData reloads task/group data while preserving UI state (cursor, filters, collapsed groups)

func (TasksModel) Update

func (m TasksModel) Update(msg tea.Msg) (TasksModel, tea.Cmd)

Update handles messages

func (TasksModel) View

func (m TasksModel) View() string

View renders the task list screen

type ViewTaskMsg

type ViewTaskMsg struct {
	Task *data.Task
}

Jump to

Keyboard shortcuts

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