Documentation
¶
Index ¶
- type FetchLibraryItemsMsg
- type GoBackMsg
- type KeyMap
- type LibraryItemsMsg
- type Model
- func (m *Model) Configure(libraryID string, libraries []abs.Library)
- func (m Model) Error() error
- func (m Model) Init() tea.Cmd
- func (m Model) Items() []abs.LibraryItem
- func (m Model) Loading() bool
- func (m Model) Page() int
- func (m Model) SelectedLibraryMediaType() string
- func (m *Model) SetSize(width, height int)
- func (m Model) TotalItems() int
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
- type NavigateDetailMsg
- type NavigateSearchMsg
- type NavigateSeriesListMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FetchLibraryItemsMsg ¶
FetchLibraryItemsMsg is the command payload to request a page of items.
type GoBackMsg ¶
type GoBackMsg struct{}
GoBackMsg requests navigating back from the library screen.
type KeyMap ¶
type KeyMap struct {
Enter key.Binding
Back key.Binding
NextLib key.Binding
PageUp key.Binding
PageDown key.Binding
Search key.Binding
Series key.Binding
Select key.Binding
}
KeyMap defines keybindings for the library screen.
func DefaultKeyMap ¶
func DefaultKeyMap() KeyMap
DefaultKeyMap returns the default keybindings for the library screen.
type LibraryItemsMsg ¶
type LibraryItemsMsg struct {
Items []abs.LibraryItem
Total int
Page int
LibraryID string
Err error
}
LibraryItemsMsg carries the result of fetching library items.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the bubbletea model for the library screen.
func (*Model) Configure ¶
Configure updates the active library context while preserving cached pages.
func (Model) Items ¶
func (m Model) Items() []abs.LibraryItem
Items returns the current library items.
func (Model) SelectedLibraryMediaType ¶
SelectedLibraryMediaType returns the media type of the current library, or empty string.
func (Model) TotalItems ¶
TotalItems returns the total number of items available.
type NavigateDetailMsg ¶
type NavigateDetailMsg struct {
}
NavigateDetailMsg requests navigation to the detail screen for an item.
type NavigateSearchMsg ¶
type NavigateSearchMsg struct {
}
NavigateSearchMsg requests navigation to the search screen for the current library.
type NavigateSeriesListMsg ¶
type NavigateSeriesListMsg struct {
}
NavigateSeriesListMsg requests navigation to the current library's series browser.