Documentation
¶
Index ¶
- Constants
- Variables
- func AskQuestion(question, placeholder string) string
- func GoBack() tea.Msg
- func MakeSplashScreen() (tea.Model, tea.Cmd)
- func NWDeleteFilm() tea.Msg
- func NewFilmDetailsCmd(film *app.Film) tea.Cmd
- func RunApplicationTUI(username string) error
- func UpdateScreen() tea.Msg
- type AddListsScreen
- type ApplicationTUI
- func (a *ApplicationTUI) AskYesNo(question string, callback func(bool) tea.Msg)
- func (a *ApplicationTUI) Init() tea.Cmd
- func (a *ApplicationTUI) Popup(text string)
- func (a *ApplicationTUI) TooSmall() bool
- func (a *ApplicationTUI) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (a *ApplicationTUI) UpdateRouter(msg tea.Msg) []tea.Cmd
- func (a *ApplicationTUI) View() string
- type FilmAction
- type FilmDetailsModel
- type FilmResultItem
- type GoBackMsg
- type JoinModel
- type ListSelector
- type MainScreen
- type MainScreenPanes
- type Message
- type NWModel
- type NewFilmDetailsMsg
- type PopupModel
- type Question
- type ResizeLockModel
- type ScreenStack
- type SearchFilms
- type SearchModel
- type SplashScreenModel
- type StatusBarModel
- type UpdateScreenMsg
- type UpdateSearchFilterMsg
- type UpdateSearchItemsMsg
- type YesNoPrompt
- type YesNoResponseMsg
Constants ¶
View Source
const ( Title = "NW – Next Watch" Subtitle = "A TUI utility for selecting films to watch from Letterboxd (powered by TMDB)." License = `` /* 776-byte string literal not displayed */ )
View Source
const SplashText = " NW Loading... "
Variables ¶
View Source
var ( About = strings.Join([]string{ lipgloss.NewStyle().Bold(true).Render(fmt.Sprintf("%s (%s)", Title, app.Version)), lipgloss.NewStyle().Italic(true).Render(Subtitle), popupTextStyle.Render(License), }, "\n") )
View Source
var NoRebind = []string{}
Functions ¶
func AskQuestion ¶
func NWDeleteFilm ¶
func RunApplicationTUI ¶
func UpdateScreen ¶
Types ¶
type AddListsScreen ¶
type AddListsScreen struct {
// contains filtered or unexported fields
}
func MakeAddListScreen ¶
func MakeAddListScreen(a *ApplicationTUI) *AddListsScreen
func (*AddListsScreen) Init ¶
func (al *AddListsScreen) Init() tea.Cmd
func (*AddListsScreen) View ¶
func (al *AddListsScreen) View() string
type ApplicationTUI ¶
type ApplicationTUI struct {
*app.Application
// contains filtered or unexported fields
}
Main model struct that drives NW TUI
func (*ApplicationTUI) AskYesNo ¶
func (a *ApplicationTUI) AskYesNo(question string, callback func(bool) tea.Msg)
func (*ApplicationTUI) Init ¶
func (a *ApplicationTUI) Init() tea.Cmd
func (*ApplicationTUI) Popup ¶
func (a *ApplicationTUI) Popup(text string)
func (*ApplicationTUI) TooSmall ¶ added in v0.1.8
func (a *ApplicationTUI) TooSmall() bool
func (*ApplicationTUI) UpdateRouter ¶
func (a *ApplicationTUI) UpdateRouter(msg tea.Msg) []tea.Cmd
Handle update routing with overlays
func (*ApplicationTUI) View ¶
func (a *ApplicationTUI) View() string
type FilmAction ¶
type FilmAction struct {
// contains filtered or unexported fields
}
type FilmDetailsModel ¶
type FilmDetailsModel struct {
// contains filtered or unexported fields
}
func MakeFilmDetailsModel ¶
func MakeFilmDetailsModel(f *app.Film, a *ApplicationTUI) *FilmDetailsModel
func MakeFilmDetailsModelFromResults ¶
func MakeFilmDetailsModelFromResults(f tmdb.MovieResult, a *ApplicationTUI) *FilmDetailsModel
func (*FilmDetailsModel) Focus ¶
func (fd *FilmDetailsModel) Focus()
func (*FilmDetailsModel) Init ¶
func (fd *FilmDetailsModel) Init() tea.Cmd
func (*FilmDetailsModel) Unfocus ¶
func (fd *FilmDetailsModel) Unfocus()
func (*FilmDetailsModel) View ¶
func (fd *FilmDetailsModel) View() string
type FilmResultItem ¶
type FilmResultItem tmdb.MovieResult
func (FilmResultItem) FilterValue ¶
func (fi FilmResultItem) FilterValue() string
func (FilmResultItem) String ¶
func (fi FilmResultItem) String() string
type JoinModel ¶
type JoinModel struct {
// contains filtered or unexported fields
}
Bubbletea model joining two other models; it passes all updates to both
type ListSelector ¶
type ListSelector struct {
// contains filtered or unexported fields
}
Model for viewing and selecting film lists. It is used for both view and searching through lists.
func MakeListSelector ¶
func MakeListSelector(a *ApplicationTUI, title string, items []list.Item, delegate list.ItemDelegate) *ListSelector
func MakeViewListPane ¶
func MakeViewListPane(a *ApplicationTUI) *ListSelector
func (*ListSelector) Focus ¶
func (ls *ListSelector) Focus() tea.Cmd
func (*ListSelector) Init ¶
func (ls *ListSelector) Init() tea.Cmd
func (*ListSelector) Unfocus ¶
func (ls *ListSelector) Unfocus()
func (*ListSelector) View ¶
func (ls *ListSelector) View() string
type MainScreen ¶
type MainScreen struct {
// contains filtered or unexported fields
}
func MakeMainScreen ¶
func MakeMainScreen(a *ApplicationTUI) *MainScreen
func (*MainScreen) Init ¶
func (ms *MainScreen) Init() tea.Cmd
func (*MainScreen) NewFilmDetails ¶
func (ms *MainScreen) NewFilmDetails(film app.Film)
func (*MainScreen) View ¶
func (ms *MainScreen) View() string
type MainScreenPanes ¶ added in v0.2.0
type MainScreenPanes struct {
// contains filtered or unexported fields
}
Panes on the Main Screen which focus can be toggled between
func (*MainScreenPanes) Init ¶ added in v0.2.0
func (p *MainScreenPanes) Init() tea.Cmd
func (*MainScreenPanes) View ¶ added in v0.2.0
func (p *MainScreenPanes) View() string
type NWModel ¶
type NWModel struct {
// contains filtered or unexported fields
}
func MakeNWModel ¶
func MakeNWModel(a *ApplicationTUI) *NWModel
type NewFilmDetailsMsg ¶
type NewFilmDetailsMsg struct {
// contains filtered or unexported fields
}
type PopupModel ¶
type PopupModel struct {
// contains filtered or unexported fields
}
func (*PopupModel) Init ¶
func (pm *PopupModel) Init() tea.Cmd
func (*PopupModel) View ¶
func (pm *PopupModel) View() string
type ResizeLockModel ¶
type ResizeLockModel struct {
// contains filtered or unexported fields
}
func (*ResizeLockModel) Init ¶
func (fl *ResizeLockModel) Init() tea.Cmd
func (*ResizeLockModel) View ¶
func (fl *ResizeLockModel) View() string
type ScreenStack ¶
type SearchFilms ¶
type SearchFilms struct {
// contains filtered or unexported fields
}
func MakeSearchFilms ¶
func MakeSearchFilms(a *ApplicationTUI) *SearchFilms
func (*SearchFilms) Init ¶
func (sf *SearchFilms) Init() tea.Cmd
func (*SearchFilms) View ¶
func (sf *SearchFilms) View() string
type SearchModel ¶
type SearchModel struct {
ListSelector
// contains filtered or unexported fields
}
Model with text search input and list of results below
func MakeSearchListPane ¶
func MakeSearchListPane(a *ApplicationTUI) *SearchModel
func MakeSearchModel ¶
func MakeSearchModel( a *ApplicationTUI, items []list.Item, searchText string, delegate list.ItemDelegate, defaultMode mode, inputAction func(string) tea.Cmd, queryAction func(string, list.Item) tea.Cmd, ) *SearchModel
func (*SearchModel) Focus ¶
func (sm *SearchModel) Focus()
func (*SearchModel) Init ¶
func (sm *SearchModel) Init() tea.Cmd
func (*SearchModel) Unfocus ¶
func (sm *SearchModel) Unfocus()
func (*SearchModel) View ¶
func (sm *SearchModel) View() string
type SplashScreenModel ¶
type SplashScreenModel struct {
// contains filtered or unexported fields
}
func (*SplashScreenModel) Init ¶
func (ss *SplashScreenModel) Init() tea.Cmd
func (*SplashScreenModel) SetError ¶
func (ss *SplashScreenModel) SetError(err error)
func (*SplashScreenModel) View ¶
func (ss *SplashScreenModel) View() string
type StatusBarModel ¶
type StatusBarModel struct {
// contains filtered or unexported fields
}
func MakeStatusBar ¶
func MakeStatusBar(a *ApplicationTUI) *StatusBarModel
func (*StatusBarModel) Init ¶
func (sb *StatusBarModel) Init() tea.Cmd
func (*StatusBarModel) View ¶
func (sb *StatusBarModel) View() string
type UpdateScreenMsg ¶
type UpdateScreenMsg struct{}
type UpdateSearchFilterMsg ¶
type UpdateSearchFilterMsg struct {
// contains filtered or unexported fields
}
type UpdateSearchItemsMsg ¶
type UpdateSearchItemsMsg struct {
// contains filtered or unexported fields
}
type YesNoPrompt ¶
type YesNoPrompt struct {
// contains filtered or unexported fields
}
Model for yes no question pop-up
func (*YesNoPrompt) Init ¶
func (p *YesNoPrompt) Init() tea.Cmd
func (*YesNoPrompt) View ¶
func (p *YesNoPrompt) View() string
type YesNoResponseMsg ¶
type YesNoResponseMsg struct {
// contains filtered or unexported fields
}
Response to prompt: Yes [true] No [false]
Click to show internal directories.
Click to hide internal directories.