tui

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateFileListViewport

func CalculateFileListViewport(currentViewport, currentCursor, totalItems, terminalHeight, headerLines int) int

CalculateFileListViewport calculates the viewport position for file list

func CalculateItemsPerScreen

func CalculateItemsPerScreen(height int) int

CalculateItemsPerScreen calculates how many items fit on screen

func CalculateSimulatorViewport

func CalculateSimulatorViewport(currentViewport, currentCursor, totalItems, terminalHeight int) int

CalculateSimulatorViewport calculates the viewport position for simulator list

Types

type Model

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

Model represents the application state

func New

func New(fetcher simulator.Fetcher, startWithApps bool) Model

New creates a new Model with the given fetcher

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model

func (Model) Update

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

Update handles messages and updates the model

func (Model) View

func (m Model) View() string

View renders the UI using the component system

type ViewState

type ViewState int

ViewState represents the current view

const (
	SimulatorListView ViewState = iota
	AllAppsView
	AppListView
	FileListView
	FileViewerView
	DatabaseTableListView
	DatabaseTableContentView
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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