ui

package
v0.0.0-...-a87e50c Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2025 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Overview

staacccccck

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppState

type AppState interface {
	Update(msg tea.Msg) (AppState, tea.Cmd)
	RenderCells(*flexbox.FlexBox)
}

A view of the app

type RootModel

type RootModel struct {
	States StateStack

	Client *api.TripClient

	OriginID      string
	DestinationID string

	Sidebar *flexbox.Cell
	Main    *flexbox.Cell
	// contains filtered or unexported fields
}

func InitialiseRootModel

func InitialiseRootModel() (m *RootModel)

func (*RootModel) Init

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

func (*RootModel) Update

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

func (*RootModel) View

func (m *RootModel) View() string

type StateStack

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

func (*StateStack) Peek

func (s *StateStack) Peek() AppState

See the current state of the app

func (*StateStack) Pop

func (s *StateStack) Pop() AppState

"Go back" - set the previous state of the app as the current Prevents user from showing a state before the welcome

func (*StateStack) Push

func (s *StateStack) Push(state AppState)

Set state as the current app state

func (*StateStack) Size

func (s *StateStack) Size() int

see how many states currently are on the stack

Jump to

Keyboard shortcuts

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