ui

package
v1.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is set from main.go

Functions

func RenderPage

func RenderPage(layout PageLayout) string

RenderPage renders a page with consistent layout using the template This ensures all pages have the same spacing and structure

func RenderPageWithBottomHelp

func RenderPageWithBottomHelp(layout PageLayout, terminalHeight int) string

RenderPageWithBottomHelp renders a page with help text at the bottom of the screen

func RenderStationDetails added in v1.1.0

func RenderStationDetails(station api.Station) string

RenderStationDetails renders station details in a formatted way

Types

type App

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

func NewApp

func NewApp() App

func (App) Init

func (a App) Init() tea.Cmd

func (App) Update

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

func (App) View

func (a App) View() string

type ConnectionSettingsModel added in v1.6.0

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

ConnectionSettingsModel represents the connection settings page

func NewConnectionSettingsModel added in v1.6.0

func NewConnectionSettingsModel() ConnectionSettingsModel

NewConnectionSettingsModel creates a new connection settings model

func (ConnectionSettingsModel) Init added in v1.6.0

func (m ConnectionSettingsModel) Init() tea.Cmd

Init initializes the connection settings model

func (ConnectionSettingsModel) Update added in v1.6.0

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

Update handles messages for connection settings

func (ConnectionSettingsModel) View added in v1.6.0

View renders the connection settings screen

type GistModel

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

func NewGistModel

func NewGistModel(favoritePath string) GistModel

func (GistModel) Init

func (m GistModel) Init() tea.Cmd

func (GistModel) Update

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

func (GistModel) View

func (m GistModel) View() string

type ListManagementModel

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

ListManagementModel represents the list management screen

func NewListManagementModel

func NewListManagementModel(favoritePath string) ListManagementModel

NewListManagementModel creates a new list management model

func (ListManagementModel) Init

func (m ListManagementModel) Init() tea.Cmd

Init initializes the list management screen

func (ListManagementModel) Update

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

Update handles messages for the list management screen

func (ListManagementModel) View

func (m ListManagementModel) View() string

View renders the list management screen

type LuckyModel

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

LuckyModel represents the I Feel Lucky screen

func NewLuckyModel

func NewLuckyModel(apiClient *api.Client, favoritePath string) LuckyModel

NewLuckyModel creates a new lucky screen model

func (LuckyModel) Init

func (m LuckyModel) Init() tea.Cmd

Init initializes the lucky screen

func (LuckyModel) Update

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

Update handles messages for the lucky screen

func (LuckyModel) View

func (m LuckyModel) View() string

View renders the lucky screen

type PageLayout

type PageLayout struct {
	Title    string // Main title (optional)
	Subtitle string // Subtitle (optional)
	Content  string // Main content area
	Help     string // Help text at bottom
}

PageLayout represents a consistent page layout structure

type PlayModel

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

PlayModel represents the play screen

func NewPlayModel

func NewPlayModel(favoritePath string) PlayModel

NewPlayModel creates a new play screen model

func (PlayModel) Init

func (m PlayModel) Init() tea.Cmd

Init initializes the play screen

func (PlayModel) Update

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

Update handles messages for the play screen

func (PlayModel) View

func (m PlayModel) View() string

View renders the play screen

type Screen

type Screen int

type SearchModel

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

SearchModel represents the search screen

func NewSearchModel

func NewSearchModel(apiClient *api.Client, favoritePath string) SearchModel

NewSearchModel creates a new search screen model

func (SearchModel) Init

func (m SearchModel) Init() tea.Cmd

Init initializes the search screen

func (SearchModel) Update

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

Update handles messages for the search screen

func (SearchModel) View

func (m SearchModel) View() string

View renders the search screen

type SettingsModel

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

SettingsModel represents the settings screen

func NewSettingsModel

func NewSettingsModel(favoritePath string) SettingsModel

NewSettingsModel creates a new settings screen model

func (SettingsModel) Init

func (m SettingsModel) Init() tea.Cmd

Init initializes the settings screen

func (SettingsModel) Update

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

Update handles messages for the settings screen

func (SettingsModel) View

func (m SettingsModel) View() string

View renders the settings screen

type ShuffleSettingsModel added in v1.5.0

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

ShuffleSettingsModel represents the shuffle settings page

func NewShuffleSettingsModel added in v1.5.0

func NewShuffleSettingsModel() ShuffleSettingsModel

NewShuffleSettingsModel creates a new shuffle settings model

func (ShuffleSettingsModel) Init added in v1.5.0

func (m ShuffleSettingsModel) Init() tea.Cmd

Init initializes the shuffle settings model

func (ShuffleSettingsModel) Update added in v1.5.0

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

Update handles messages for shuffle settings

func (ShuffleSettingsModel) View added in v1.5.0

func (m ShuffleSettingsModel) View() string

View renders the shuffle settings screen

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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