Documentation
¶
Index ¶
- func DefaultAnimeListKeyMap() animeListKeyMap
- func DefaultMainMenuKeyMap() mainMenuKeyMap
- func ForceRefreshCacheInBackground(cfg *config.Config, client *anilist.Client)
- func GetBanner() string
- func GetBannerGradient() string
- func GetBannerGradientIncognito() string
- func RefreshCacheInBackground(cfg *config.Config, client *anilist.Client)
- type AllListsResultMsg
- type AniListAuth
- type AniListAuthErrorMsg
- type AniListAuthSuccessMsg
- type AnimeItem
- type AnimeList
- type AnimeListState
- type AnimeSearch
- type AnimeSearchState
- type AnimeSelectedMsg
- type AutoplayPrompt
- type AutoplayPromptMsg
- type BackMsg
- type CacheData
- type ConfigEditor
- type ConfigEditorState
- type ConfigItem
- type ConfigItemType
- type ConfigSavedMsg
- type ContinueWatchingAnimeMsg
- type EpisodeReadyMsg
- type EpisodeSelect
- type EpisodeSelectState
- type ExtendedKeyMap
- type MainMenu
- func (m *MainMenu) GetIncognitoMode() bool
- func (m *MainMenu) GetSelected() string
- func (m *MainMenu) Init() tea.Cmd
- func (m *MainMenu) SetClient(client *anilist.Client)
- func (m *MainMenu) SetLoadingMsg(msg string)
- func (m *MainMenu) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *MainMenu) View() string
- type MenuSelectionMsg
- type SearchAnimeItem
- type SearchResultMsg
- type Styles
- type UniversalKeyMap
- type UniversalKeys
- type UpdateCompleteMsg
- type UpdateProgress
- type UpdateProgressState
- type UpdateType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAnimeListKeyMap ¶
func DefaultAnimeListKeyMap() animeListKeyMap
DefaultAnimeListKeyMap returns the default keybindings
func DefaultMainMenuKeyMap ¶
func DefaultMainMenuKeyMap() mainMenuKeyMap
DefaultMainMenuKeyMap returns the default keybindings
func ForceRefreshCacheInBackground ¶
ForceRefreshCacheInBackground forces a cache refresh in the background This bypasses the 5-minute freshness check and is used when updates are made
func GetBannerGradient ¶
func GetBannerGradient() string
GetBannerGradient returns the ONI banner with gradient colors
func GetBannerGradientIncognito ¶
func GetBannerGradientIncognito() string
GetBannerGradientIncognito returns the ONI banner with hot pink gradient for incognito mode
func RefreshCacheInBackground ¶
RefreshCacheInBackground refreshes the anime list cache in the background This can be called on app startup to pre-warm the cache It skips refresh if cache was updated less than 5 minutes ago to prevent rate limits
Types ¶
type AllListsResultMsg ¶
type AllListsResultMsg struct {
AllEntries map[string][]anilist.MediaListEntry
Err error
IsRefresh bool
}
AllListsResultMsg is sent when all lists are ready
type AniListAuth ¶
type AniListAuth struct {
// contains filtered or unexported fields
}
AniListAuth handles AniList authentication
func NewAniListAuth ¶
func NewAniListAuth(cfg *config.Config) *AniListAuth
NewAniListAuth creates a new AniList authentication screen
func (*AniListAuth) Init ¶
func (m *AniListAuth) Init() tea.Cmd
func (*AniListAuth) View ¶
func (m *AniListAuth) View() string
type AniListAuthErrorMsg ¶
type AniListAuthErrorMsg struct {
Err error
}
AniListAuthErrorMsg is sent when authentication fails
type AniListAuthSuccessMsg ¶
AniListAuthSuccessMsg is sent when authentication succeeds
type AnimeItem ¶
type AnimeItem struct {
Entry anilist.MediaListEntry
}
AnimeItem represents an anime entry in the list
func (AnimeItem) Description ¶
func (AnimeItem) FilterValue ¶
type AnimeList ¶
type AnimeList struct {
// contains filtered or unexported fields
}
AnimeList represents the anime list model
func NewAnimeList ¶
NewAnimeList creates a new anime list
func (*AnimeList) GetSelectedEntry ¶
func (m *AnimeList) GetSelectedEntry() *anilist.MediaListEntry
GetSelectedEntry returns the currently selected entry
type AnimeListState ¶
type AnimeListState int
AnimeListState represents the list state
const ( ListLoading AnimeListState = iota ListResults ListSearchInput ListSearchResults ListSearchLoading )
type AnimeSearch ¶
type AnimeSearch struct {
// contains filtered or unexported fields
}
AnimeSearch represents the anime search model
func NewAnimeSearch ¶
func NewAnimeSearch(cfg *config.Config, client *anilist.Client) *AnimeSearch
NewAnimeSearch creates a new anime search
type AnimeSearchState ¶
type AnimeSearchState int
AnimeSearchState represents the search state
const ( SearchInput AnimeSearchState = iota SearchResults SearchLoading )
type AnimeSelectedMsg ¶
type AnimeSelectedMsg struct {
Anime anilist.Anime
Entry *anilist.MediaListEntry // Optional: entry from user's list with progress
ShowEpisodeSelect bool // If true, show episode selection; if false, auto-play
}
AnimeSelectedMsg is sent when an anime is selected
type AutoplayPrompt ¶
type AutoplayPrompt struct {
// contains filtered or unexported fields
}
AutoplayPrompt displays a prompt asking if the user wants to enable autoplay
func NewAutoplayPrompt ¶
func NewAutoplayPrompt(cfg *config.Config, animeTitle string, nextEpisode int) *AutoplayPrompt
NewAutoplayPrompt creates a new autoplay prompt
func (*AutoplayPrompt) Init ¶
func (m *AutoplayPrompt) Init() tea.Cmd
func (*AutoplayPrompt) View ¶
func (m *AutoplayPrompt) View() string
type AutoplayPromptMsg ¶
type AutoplayPromptMsg struct {
EnableAutoplay bool
}
AutoplayPromptMsg is sent when user makes a choice
type CacheData ¶
type CacheData struct {
Entries map[string][]anilist.MediaListEntry `json:"entries"`
Timestamp time.Time `json:"timestamp"`
}
CacheData represents the cache file structure
type ConfigEditor ¶
type ConfigEditor struct {
// contains filtered or unexported fields
}
ConfigEditor represents the config editor model
func NewConfigEditor ¶
func NewConfigEditor(cfg *config.Config) *ConfigEditor
NewConfigEditor creates a new config editor
func (*ConfigEditor) Init ¶
func (m *ConfigEditor) Init() tea.Cmd
Init initializes the config editor
type ConfigEditorState ¶
type ConfigEditorState int
ConfigEditorState represents the config editor state
const ( ConfigMenuSelection ConfigEditorState = iota ConfigTextEdit ConfigToggleEdit ConfigSelectEdit ConfigSaving ConfigSaved )
type ConfigItem ¶
type ConfigItem struct {
Name string
DisplayName string
Value interface{}
Type ConfigItemType
Category string
Options []string // For select type
}
ConfigItem represents a configuration item
type ConfigItemType ¶
type ConfigItemType int
ConfigItemType represents the type of config item
const ( ConfigTypeText ConfigItemType = iota ConfigTypeToggle ConfigTypeSelect )
type ConfigSavedMsg ¶
type ConfigSavedMsg struct {
Err error
}
ConfigSavedMsg is sent when config is saved
type ContinueWatchingAnimeMsg ¶
ContinueWatchingAnimeMsg is sent when the continue watching anime is fetched
type EpisodeReadyMsg ¶
EpisodeReadyMsg is sent when episode selection is complete
type EpisodeSelect ¶
type EpisodeSelect struct {
// contains filtered or unexported fields
}
EpisodeSelect represents the episode selection model
func NewEpisodeSelect ¶
NewEpisodeSelect creates a new episode selector
func (*EpisodeSelect) GetSelectedEpisode ¶
func (m *EpisodeSelect) GetSelectedEpisode() int
GetSelectedEpisode returns the selected episode number
func (*EpisodeSelect) GetSubOrDub ¶
func (m *EpisodeSelect) GetSubOrDub() string
GetSubOrDub returns the selected audio type
func (*EpisodeSelect) Init ¶
func (m *EpisodeSelect) Init() tea.Cmd
Init initializes the episode selector
func (*EpisodeSelect) View ¶
func (m *EpisodeSelect) View() string
View renders the episode selector
type EpisodeSelectState ¶
type EpisodeSelectState int
EpisodeSelectState represents the episode selection state
const ( EpisodeSubDubSelect EpisodeSelectState = iota EpisodeNumberInput EpisodeReady )
type ExtendedKeyMap ¶
type ExtendedKeyMap struct {
Universal UniversalKeys
ViewKeys []key.Binding // View-specific keys for short help
ViewFull [][]key.Binding // View-specific keys for full help
}
ExtendedKeyMap wraps a view-specific keymap with universal keys
func (ExtendedKeyMap) FullHelp ¶
func (k ExtendedKeyMap) FullHelp() [][]key.Binding
func (ExtendedKeyMap) ShortHelp ¶
func (k ExtendedKeyMap) ShortHelp() []key.Binding
type MainMenu ¶
type MainMenu struct {
// contains filtered or unexported fields
}
MainMenu represents the main menu model
func NewMainMenu ¶
NewMainMenu creates a new main menu
func NewMainMenuWithClient ¶
NewMainMenuWithClient creates a new main menu with an AniList client
func (*MainMenu) GetIncognitoMode ¶
GetIncognitoMode returns the current incognito mode state
func (*MainMenu) GetSelected ¶
GetSelected returns the selected option
func (*MainMenu) SetLoadingMsg ¶
SetLoadingMsg sets the loading message
type MenuSelectionMsg ¶
type MenuSelectionMsg struct {
Selection string
ShowEpisodeSelect bool // If true, show episode selection instead of auto-playing
}
MenuSelectionMsg is sent when a menu item is selected
type SearchAnimeItem ¶
SearchAnimeItem represents a search result anime
func (SearchAnimeItem) Description ¶
func (i SearchAnimeItem) Description() string
func (SearchAnimeItem) FilterValue ¶
func (i SearchAnimeItem) FilterValue() string
func (SearchAnimeItem) Title ¶
func (i SearchAnimeItem) Title() string
type SearchResultMsg ¶
SearchResultMsg is sent when search results are ready
type Styles ¶
type Styles struct {
Title lipgloss.Style
Subtitle lipgloss.Style
MenuItem lipgloss.Style
SelectedItem lipgloss.Style
Info lipgloss.Style
Error lipgloss.Style
Success lipgloss.Style
Prompt lipgloss.Style
Border lipgloss.Style
Help lipgloss.Style
StatusBar lipgloss.Style
AnimeTitle lipgloss.Style
EpisodeInfo lipgloss.Style
}
Styles contains all the lipgloss styles used in the UI
func DefaultStyles ¶
func DefaultStyles() Styles
DefaultStyles returns the default styles with enhanced colors
func IncognitoStyles ¶
func IncognitoStyles() Styles
IncognitoStyles returns styles with hot pink color scheme for incognito mode
type UniversalKeyMap ¶
type UniversalKeyMap struct {
UniversalKeys
}
UniversalKeyMap implements help.KeyMap for universal keys
func (UniversalKeyMap) FullHelp ¶
func (k UniversalKeyMap) FullHelp() [][]key.Binding
func (UniversalKeyMap) ShortHelp ¶
func (k UniversalKeyMap) ShortHelp() []key.Binding
type UniversalKeys ¶
UniversalKeys defines keybindings available in all views
func DefaultUniversalKeys ¶
func DefaultUniversalKeys() UniversalKeys
DefaultUniversalKeys returns the default universal keybindings
type UpdateCompleteMsg ¶
UpdateCompleteMsg is sent when update is complete
type UpdateProgress ¶
type UpdateProgress struct {
// contains filtered or unexported fields
}
UpdateProgress represents the update progress model
func NewUpdateProgress ¶
func NewUpdateProgress(cfg *config.Config, client *anilist.Client) *UpdateProgress
NewUpdateProgress creates a new update progress UI
func (*UpdateProgress) Init ¶
func (m *UpdateProgress) Init() tea.Cmd
Init initializes the update progress UI
func (*UpdateProgress) View ¶
func (m *UpdateProgress) View() string
View renders the update progress UI
type UpdateProgressState ¶
type UpdateProgressState int
UpdateProgressState represents the update state
const ( UpdateTypeSelection UpdateProgressState = iota UpdateAnimeSelection UpdateInputEntry UpdateProcessing UpdateComplete )
type UpdateType ¶
type UpdateType int
UpdateType represents the type of update
const ( UpdateEpisode UpdateType = iota UpdateStatus UpdateScore )