category

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultKeymap = Keymap{
	NewFeed: key.NewBinding(
		key.WithKeys("n", "ctrl+n"),
		key.WithHelp("n/ctrl+n", "New"),
	),
	EditFeed: key.NewBinding(
		key.WithKeys("e", "ctrl+e"),
		key.WithHelp("e/ctrl+e", "Edit"),
	),
	DeleteFeed: key.NewBinding(
		key.WithKeys("d", "ctrl+d"),
		key.WithHelp("d/ctrl+d", "Delete"),
	),
}

DefaultKeymap contains the default key bindings for this tab

Functions

This section is empty.

Types

type ChosenFeedMsg added in v1.5.2

type ChosenFeedMsg struct {
	Name    string
	URL     string
	OldName string
	Parent  string
	IsEdit  bool
}

ChosenFeedMsg is the message displayed when a category is successfully chosen.

type Keymap

type Keymap struct {
	NewFeed    key.Binding
	EditFeed   key.Binding
	DeleteFeed key.Binding
}

Keymap contains the key bindings for this tab

func (*Keymap) SetEnabled added in v1.5.1

func (m *Keymap) SetEnabled(enabled bool)

SetEnabled allows to disable/enable shortcuts

type Model

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

Model contains the state of this tab

func New

func New(colors *theme.Colors, width, height int, title string, fetcher backend.Fetcher) Model

New creates a new category tab with sensible defaults

func (Model) FullHelp

func (m Model) FullHelp() [][]key.Binding

FullHelp returns the full help for this tab

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the tab

func (Model) SetSize

func (m Model) SetSize(width, height int) tab.Tab

SetSize sets the dimensions of the tab

func (Model) ShortHelp

func (m Model) ShortHelp() []key.Binding

ShortHelp returns the short help for this tab

func (Model) Style

func (m Model) Style() tab.Style

Style returns the style of the tab

func (Model) Title

func (m Model) Title() string

Title returns the title of the tab

func (Model) Update

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

Update updates the variables of the tab

func (Model) View

func (m Model) View() string

View returns the view of the tab

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

Popup is the feed popup where a user can create/edit a feed.

func NewPopup

func NewPopup(colors *theme.Colors, oldName, oldURL, parent string) Popup

NewPopup returns a new feed popup.

func (Popup) GetSize added in v1.6.5

func (p Popup) GetSize() (width, height int)

GetSize returns the size of the popup.

func (Popup) Init

func (p Popup) Init() tea.Cmd

Init initializes the popup.

func (Popup) Update

func (p Popup) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update updates the popup.

func (Popup) View

func (p Popup) View() string

View renders the popup.

Jump to

Keyboard shortcuts

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