list

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package list defines the styles and renders the Bubbles list for torrents on the main screen.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Self    *torrent.Torrent
	Theme   *styles.ColorTheme
	Added   time.Time
	Created time.Time
	Comment string
	Program string
}

Define the torrent items that go in the torrent list

func (Item) Description

func (i Item) Description() string

Description returns the torrent info, including the download, upload, and peers stats.

func (Item) FilterValue

func (i Item) FilterValue() string

FilterValue currently has no function, as torrent filtering is not currently supported in the main screen.

func (Item) Title

func (i Item) Title() string

Title returns the name of the torrent.

type ItemDelegate

type ItemDelegate struct{}

func (ItemDelegate) Height

func (d ItemDelegate) Height() int

Height returns the height setting for a list entry.

func (ItemDelegate) Render

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

Render renders a list entry for the torrent list with the color theme styling.

func (ItemDelegate) Spacing

func (d ItemDelegate) Spacing() int

Spacing returns the spacing setting for a list entry.

func (ItemDelegate) Update

func (d ItemDelegate) Update(msg tea.Msg, m *list.Model) tea.Cmd

Update updates the list model.

Jump to

Keyboard shortcuts

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