ui

package
v0.0.0-...-1705a99 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppModel

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

AppModel is the parent model that manages switching between views

func NewAppModel

func NewAppModel(client *youtube.Client) AppModel

NewAppModel creates a new app model

func (AppModel) Init

func (m AppModel) Init() tea.Cmd

Init initializes the app model

func (AppModel) Update

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

Update handles app model updates

func (AppModel) View

func (m AppModel) View() string

View renders the current view

type CustomDelegate

type CustomDelegate struct {
	list.DefaultDelegate
	// contains filtered or unexported fields
}

CustomDelegate extends the default delegate with custom rendering

func (CustomDelegate) Render

func (d CustomDelegate) Render(w io.Writer, m list.Model, index int, listItem list.Item)

Render overrides the default render method to add a bullet for selected items

type Item

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

Item represents a video in the list

func (Item) Description

func (i Item) Description() string

Description returns the item description

func (Item) FilterValue

func (i Item) FilterValue() string

FilterValue returns the value to filter on

func (Item) Title

func (i Item) Title() string

Title returns the item title

type Model

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

Model represents the UI state

func NewModel

func NewModel(client *youtube.Client) Model

NewModel creates a new UI model

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model

func (Model) ReturnFromSubscriptions

func (m Model) ReturnFromSubscriptions() tea.Cmd

Add a new method to handle returning from subscription manager

func (Model) Update

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

Update handles UI updates

func (Model) View

func (m Model) View() string

View renders the UI

type SubscriptionItem

type SubscriptionItem struct {
	ID   string
	Name string
}

SubscriptionItem represents a channel subscription

func (SubscriptionItem) Description

func (i SubscriptionItem) Description() string

Description returns the item description

func (SubscriptionItem) FilterValue

func (i SubscriptionItem) FilterValue() string

FilterValue implements list.Item interface

func (SubscriptionItem) Title

func (i SubscriptionItem) Title() string

Title returns the item title

type SubscriptionModel

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

SubscriptionModel represents the subscription manager UI state

func NewSubscriptionModel

func NewSubscriptionModel(client *youtube.Client) SubscriptionModel

NewSubscriptionModel creates a new subscription manager model

func (SubscriptionModel) Init

func (m SubscriptionModel) Init() tea.Cmd

Init initializes the subscription manager model

func (SubscriptionModel) Update

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

Update handles UI updates for the subscription manager

func (SubscriptionModel) View

func (m SubscriptionModel) View() string

View renders the subscription manager UI

Jump to

Keyboard shortcuts

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