app

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package app contains the primary Bubble Tea application model for terminaltask. It wires together the list view, edit menu, storage service, and configuration to provide the main interactive program.

Package app contains the primary Bubble Tea application update loop for terminaltask. It defines how the root model initializes, responds to incoming messages, and coordinates state transitions between the list and edit views.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewListKeyMap

func NewListKeyMap() *listKeyMap

NewListKeyMap constructs the default key bindings for the list view.

func NewModel

func NewModel(cfg config.Config, service taskservice.Service) tea.Model

NewModel constructs a new application model wired with the provided configuration and task service. It initializes the list and edit menu sub-models and returns a Bubble Tea model ready for use in a tea.Program.

Types

type AppStyles

type AppStyles struct {
	// Frame is the global application frame (padding/margins) applied
	// around both the list view and the editmenu view.
	Frame lipgloss.Style

	// Status contains global success/error status styles shared by
	// all views (list, edit menu, etc.).
	Status statusMessageStyles

	// List contains styles specific to the list component.
	List ListStyles

	// EditMenu contains styles for the edit menu container.
	EditMenu editmenu.Styles

	// Form contains styles for the inner edit form.
	Form editmenu.Styles
}

AppStyles is the top-level style graph for the application. It centralizes all styling concerns so that the model, update, and view logic can share a consistent visual configuration.

type ListStyles

type ListStyles struct {
	Title lipgloss.Style
}

ListStyles contains styles for the task list view, including the list title styling applied at the top of the list component.

type TasksLoadErrorMsg

type TasksLoadErrorMsg struct{ Err error }

TasksLoadErrorMsg indicates an error occurred while loading tasks.

type TasksLoadedMsg

type TasksLoadedMsg struct{ Tasks []task.Task }

TasksLoadedMsg carries tasks loaded from the service.

type TasksSaveErrorMsg

type TasksSaveErrorMsg struct{ Err error }

TasksSaveErrorMsg indicates an error occurred while saving tasks.

type TasksSavedMsg

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

TasksSavedMsg indicates tasks were saved successfully.

Jump to

Keyboard shortcuts

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