views

package
v0.0.41 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToPlayListQuitMessage

func AddToPlayListQuitMessage(m model) string

func CacheDisplay added in v0.0.30

func CacheDisplay(client *rpc.Client)
func CacheDisplay(client *rpc.Client) {
	songs := controller.GetCachedMusics(client)
	if len(songs) == 0 {
		fmt.Println("No music in cache")
		return
	}
	fmt.Println(GetTheme().ProgressStyle.Render("📁 Cache :"))
	for _, song := range songs {
		fmt.Printf(
			"    %s : %s\n", song.Hash[:shared.HashPrefixLength], song.Name,
		)
	}
}

func DisplayStatus

func DisplayStatus(client *rpc.Client)

func NewList

func NewList(items []list.Item) list.Model

func NewModel

func NewModel(client *rpc.Client, query string) *model

func PlayListMusicsDisplay

func PlayListMusicsDisplay(name string, client *rpc.Client)

func PlayListsDisplay

func PlayListsDisplay(client *rpc.Client)

func PlayQuitMessage

func PlayQuitMessage(m model) string

func SearchThenAddToPlayList

func SearchThenAddToPlayList(playlist, query string, client *rpc.Client) error

func SearchThenSelect

func SearchThenSelect(query string, client *rpc.Client) error

Types

type Themes

type Themes struct {
	MainColorStyle   string
	DocStyle         lipgloss.Style
	QuitTextStyle    lipgloss.Style
	SpinnerStyle     lipgloss.Style
	ProgressStyle    lipgloss.Style
	ColoredTextStyle lipgloss.Style
	RunningStyle     lipgloss.Style
	StoppedStyle     lipgloss.Style
	PausedStyle      lipgloss.Style
	PositionStyle    lipgloss.Style
	SelectMusicStyle lipgloss.Style
	FailStyle        lipgloss.Style
	TaskStyle        lipgloss.Style
	ListDelegate     list.DefaultDelegate
}

Themes struct encapsulates all theme-related styles

func GetTheme

func GetTheme() Themes

GetTheme returns the theme based on client settings

func NewBlueTheme

func NewBlueTheme() Themes

Blue theme settings

func NewPinkTheme

func NewPinkTheme() Themes

Pink theme settings

func NewPurpleTheme

func NewPurpleTheme() Themes

Purple theme settings

Jump to

Keyboard shortcuts

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