globals

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoginPageTitleColor = tcell.ColorOrange

	LoginFormBorderColor = tcell.ColorGrey
	LoginFormLabelColor  = tcell.ColorWhite
)
View Source
const (
	MainPageGridTitleColor   = tcell.ColorOrange
	MainPageGridBorderColor  = tcell.ColorLightGrey
	MainPageTableTitleColor  = tcell.ColorLightSkyBlue
	MainPageTableBorderColor = tcell.ColorGrey

	LoggedMainPageTitleColor     = tcell.ColorLightGoldenrodYellow
	LoggedMainPagePubStatusColor = tcell.ColorSandyBrown

	GuestMainPageTitleColor = tcell.ColorOrange
	GuestMainPageDescColor  = tcell.ColorLightGrey
	GuestMainPageTagColor   = tcell.ColorLightSteelBlue
)
View Source
const (
	MangaPageGridTitleColor   = tcell.ColorOrange
	MangaPageGridBorderColor  = tcell.ColorLightGrey
	MangaPageTableTitleColor  = tcell.ColorLightSkyBlue
	MangaPageTableBorderColor = tcell.ColorGrey

	MangaPageInfoViewTitleColor  = tcell.ColorLightSkyBlue
	MangaPageInfoViewBorderColor = tcell.ColorLightGrey

	MangaPageChapNumColor      = tcell.ColorLightYellow
	MangaPageTitleColor        = tcell.ColorLightSkyBlue
	MangaPageDownloadStatColor = tcell.ColorPowderBlue
	MangaPageReadStatColor     = tcell.ColorOrange
	MangaPageScanGroupColor    = tcell.ColorDarkSalmon
	MangaPageHighlightColor    = tcell.ColorMediumSpringGreen
)
View Source
const (
	SearchPageGridTitleColor   = tcell.ColorOrange
	SearchPageGridBorderColor  = tcell.ColorLightGrey
	SearchPageTableTitleColor  = tcell.ColorLightSkyBlue
	SearchPageTableBorderColor = tcell.ColorGrey

	SearchFormLabelColor = tcell.ColorWhite
)
View Source
const (
	LoginPageID  = "login_page" // Page IDs
	MainPageID   = "main_page"
	MangaPageID  = "manga_page"
	HelpPageID   = "help_page"
	SearchPageID = "search_page"

	LoginLogoutFailureModalID   = "login_failure_modal" // Modal IDs
	LoginLogoutCfmModalID       = "logout_modal"
	StoreCredentialErrorModalID = "store_cred_error_modal"
	DownloadChaptersModalID     = "download_chapters_modal"
	DownloadFinishedModalID     = "download_error_modal"
	GenericAPIErrorModalID      = "api_error_modal"
	OffsetErrorModalID          = "offset_error_modal"
)
View Source
const (
	CredFileName   = "credentials"
	ConfigFileName = "config.json"
)
View Source
const (
	HelpPageBorderColor = tcell.ColorLightGrey
)
View Source
const (
	ModalColor = tcell.ColorDarkSlateGrey
)
View Source
const (
	OffsetRange = 100
)

Variables

View Source
var (
	DownloadDir     = "downloads"
	Languages       = []string{"en"}
	DownloadQuality = "data"
	ZipType         = "zip"
)

Functions

func GetConfDir added in v0.6.0

func GetConfDir() string

GetConfDir : Find the operating system and determine the configuration directory for the application.

func LoadUserConfiguration added in v0.1.1

func LoadUserConfiguration() error

LoadUserConfiguration : Reads any user configuration settings and will create a default one if it does not exist.

func SaveConfiguration added in v0.3.0

func SaveConfiguration(path string) error

SaveConfiguration : Save user configuration.

func SetDefaultConfigurations added in v0.4.0

func SetDefaultConfigurations()

SetDefaultConfigurations : Sets default configurations.

Types

type UserConfig added in v0.1.1

type UserConfig struct {
	DownloadDir     string   `json:"downloadDir"`
	Languages       []string `json:"languages"`
	DownloadQuality string   `json:"downloadQuality"`
	ForcePort443    bool     `json:"forcePort443"`
	AsZip           bool     `json:"asZip"`
	ZipType         string   `json:"zipType"`
}

UserConfig : This struct contains information for user configurable settings.

Jump to

Keyboard shortcuts

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