ui

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateIdleDisplay

func CreateIdleDisplay() string

CreateIdleDisplay creates the idle state display

func CreateProgressBar

func CreateProgressBar(progress float64, width int) string

FormatSongInfoWithCover creates a formatted info display with cover art CreateProgressBar creates a visual progress bar

func CreateProgressText

func CreateProgressText(currentTime, totalTime, volumeText string) string

CreateProgressText creates the progress time display

func CreateWelcomeMessage

func CreateWelcomeMessage(totalSongs int) string

CreateWelcomeMessage creates the welcome screen message

func FormatDuration

func FormatDuration(seconds int) string

FormatDuration converts seconds to MM:SS format

func FormatSongInfo

func FormatSongInfo(track domain.Song, index int, status, progressBar string) string

FormatSongInfo creates a formatted info display for a song

Types

type App

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

App represents the TUI application

func NewApp

func NewApp(ctx context.Context, cfg *config.Config, lib library.Library, plr player.Player) *App

NewApp creates a new TUI application with dependency injection

func (*App) Run

func (a *App) Run() error

Run starts the application

func (*App) Stop

func (a *App) Stop()

Stop stops the application

type HelpView

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

HelpView represents the keyboard shortcuts help interface

func NewHelpView

func NewHelpView(app *App) *HelpView

NewHelpView creates a new help view

func (*HelpView) Close

func (hv *HelpView) Close()

Close hides the help view

func (*HelpView) GetContainer

func (hv *HelpView) GetContainer() *tview.Flex

GetContainer returns the help view container

func (*HelpView) IsActive

func (hv *HelpView) IsActive() bool

IsActive returns whether the help view is active

func (*HelpView) Show

func (hv *HelpView) Show()

Show displays the help view

type QueueView

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

QueueView represents the playback queue interface

func NewQueueView

func NewQueueView(app *App) *QueueView

NewQueueView creates a new queue view

func (*QueueView) Close

func (qv *QueueView) Close()

Close hides the queue view

func (*QueueView) GetContainer

func (qv *QueueView) GetContainer() *tview.Flex

GetContainer returns the queue view container

func (*QueueView) IsActive

func (qv *QueueView) IsActive() bool

IsActive returns whether the queue view is active

func (*QueueView) Show

func (qv *QueueView) Show()

Show displays the queue view

type SearchView

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

SearchView represents the search interface

func NewSearchView

func NewSearchView(app *App) *SearchView

NewSearchView creates a new search view

func (*SearchView) Close

func (sv *SearchView) Close()

Close hides the search view

func (*SearchView) GetContainer

func (sv *SearchView) GetContainer() *tview.Flex

GetContainer returns the search view container

func (*SearchView) IsActive

func (sv *SearchView) IsActive() bool

IsActive returns whether the search view is active

func (*SearchView) Show

func (sv *SearchView) Show()

Show displays the search view

Jump to

Keyboard shortcuts

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