Documentation
¶
Index ¶
- Variables
- func AutoHeal()
- func ExecuteAppStub()
- func ExpandPath(path string) string
- func RunUninstalScript()
- func RunUpdateScript()
- func ViewVersion()
- type Anime
- type AnimeResponse
- type AppState
- type Config
- type Episodes
- type MainModel
- type StreamUtils
- type Styles
- type Tab1Model
- type Tab1styles
- type Tab2Model
Constants ¶
This section is empty.
Variables ¶
var ( DefaultForegroundColor = gloss.AdaptiveColor{Light: conf.defaultUnfocusedLight, Dark: conf.defaultForegroundDark} DefaultUnfocusedColor = gloss.AdaptiveColor{Light: conf.defaultUnfocusedLight, Dark: conf.defaultUnfocusedDark} DefaultActiveTabIndicatorColor = gloss.AdaptiveColor{Light: conf.defaultActiveTabLight, Dark: conf.defaultActiveTabDark} DefaultWindowBorder = gloss.Border{ Top: " ", Bottom: "─", Left: "│", Right: "│", TopLeft: "│", TopRight: "│", BottomLeft: "└", BottomRight: "┘", } DefaultTabBorder = gloss.Border{ Top: "─", Bottom: "─", Left: "│", Right: "│", TopLeft: "╭'", TopRight: "╮", BottomLeft: "┴", BottomRight: "┴", } DefaultActiveTabBorder = gloss.Border{ Top: "─", Bottom: " ", Left: "│", Right: "│", TopLeft: "╭'", TopRight: "╮", BottomLeft: "┘", BottomRight: "└", } DefaultTabSpacerBorder = gloss.Border{ Bottom: "─", BottomRight: "┐", } )
Default colors and borders are defined here as adaptive properties to support light and dark modes. These settings provide a cohesive appearance across different themes.
Functions ¶
func AutoHeal ¶ added in v1.1.0
func AutoHeal()
* AutoHeal * ------------------ * This function is responsible for downloading missing components (internal dependecies) such * as the update script, uninstaller, config files and the VERSION profile, which are important * for the application to function properly. * If the script fails to run, an error message is displayed on the terminal, * and the program exits with a non-zero status.
func ExecuteAppStub ¶
func ExecuteAppStub()
func ExpandPath ¶
func RunUninstalScript ¶
func RunUninstalScript()
func RunUpdateScript ¶
func RunUpdateScript()
func ViewVersion ¶
func ViewVersion()
* ViewVersion * ------------------ * This function is responsible for printing the VERSION information of * the application * If the script fails to run, an error message is displayed on the terminal, * and the program exits with a non-zero status.
Types ¶
type Anime ¶ added in v1.1.0
type Anime struct {
ID string `json:"id"`
Title string `json:"title"`
SubCount float64 `json:"subCount"`
DubCount float64 `json:"dubCount"`
Episodes Episodes `json:"episodes"`
}
AnimeResponse is a struct that represents the response format for anime search queries. It contains a single field, Result, which is a slice of slices containing interface{} elements. This is used to store the search results from the API response.
type AnimeResponse ¶
type AnimeResponse struct {
Result []Anime `json:"result"`
}
ApiResponse represents the overall API response structure
type Config ¶
type Config struct {
Tab1FocusActive string
Tab1FocusInactive string
Tab1TableSelectedBackground string
Tab1TableSelectedForeground string
Tab1SpinnerColor string
Tab1SpinnerMsgColor string
Tab1KaizenAscciArtColor string
// contains filtered or unexported fields
}
func LoadConfig ¶
func LoadConfig() Config
type MainModel ¶
type MainModel struct {
// contains filtered or unexported fields
}
type StreamUtils ¶
type StreamUtils struct {
Link string `json:"direct"`
}
StreamUtils is a struct that represents the response format for retrieving a direct streaming link. It contains a single field, Link, which holds the direct URL to the stream.
type Styles ¶
type Styles struct {
Tab gloss.Style
ActiveTab gloss.Style
TabSpacer gloss.Style
TabIndicator gloss.Style
TabIndicatorLeft string
TabIndicatorRight string
TabWindow gloss.Style
}
Styles struct defines the styling properties for UI components in the application. It includes styles for tabs, active tabs, tab spacers, tab indicators, and the tab window. The styles use the Lipgloss library to manage colors, borders, and padding.
func NewTabStyles ¶
func NewTabStyles() Styles
NewTabStyles creates and returns a Styles struct configured with default properties. These styles define the appearance of the tabs and their associated elements like borders and indicators.
type Tab1Model ¶
type Tab1Model struct {
// contains filtered or unexported fields
}
func NewTab1Model ¶
func NewTab1Model() Tab1Model
type Tab1styles ¶
type Tab1styles struct {
// contains filtered or unexported fields
}
Tab1styles struct defines the styling for the specific elements of Tab1. This includes borders for lists, inputs, tables, and active/inactive color properties. It uses the Lipgloss library for consistent styling throughout the UI.
func Tab1Styles ¶
func Tab1Styles() Tab1styles
Tab1Styles creates and returns a Tab1styles struct configured with specific styles for Tab1 components. This includes list borders, input borders, table borders, and active/inactive color settings.