ui

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package ui implements Postline's terminal interface as a Bubble Tea program.

Index

Constants

View Source
const DownloadDirEnv = "POSTLINE_DOWNLOAD_DIR"

DownloadDirEnv overrides where saved attachments land.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

Model is the root Bubble Tea model. It is used as a pointer so async callbacks can be wired in after the program is constructed.

func New

func New(ctx context.Context) *Model

New builds the root model.

func NewWithProvider

func NewWithProvider(ctx context.Context, p mail.Provider) *Model

NewWithProvider builds a model bound to an existing provider, skipping authentication entirely.

func (*Model) Close

func (m *Model) Close() error

Close releases resources held by the model.

func (*Model) ForceSetup

func (m *Model) ForceSetup()

ForceSetup opens the wizard on launch even when a client is already available, which is how a user switches to their own Google Cloud project.

func (*Model) Init

func (m *Model) Init() tea.Cmd

Init starts the connection attempt.

func (*Model) SetSend

func (m *Model) SetSend(send func(tea.Msg))

SetSend wires the program's message pump so background work can push updates that are not tied to a command's return value.

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update routes messages to the active screen.

func (*Model) View

func (m *Model) View() string

View renders the active screen and registers mouse zones.

Directories

Path Synopsis
Package components holds reusable, self-contained UI widgets.
Package components holds reusable, self-contained UI widgets.
Package layout turns terminal dimensions into pane geometry, so views can ask what to draw rather than each recomputing breakpoints.
Package layout turns terminal dimensions into pane geometry, so views can ask what to draw rather than each recomputing breakpoints.
Package theme holds Postline's color palette and shared Lip Gloss styles.
Package theme holds Postline's color palette and shared Lip Gloss styles.

Jump to

Keyboard shortcuts

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