Documentation ¶
Index ¶
Constants ¶
View Source
const ( // HeaderRowNum ui header max row num HeaderRowNum = 7 FooterRowNum = 1 // MenuRowNum menu component max row num MenuRowNum = 6 // LogoColumnNum logo component max column num LogoColumnNum = 50 )
Variables ¶
View Source
var ( // ThemeConfigFS is the theme config file system. //go:embed theme/* ThemeConfigFS embed.FS // ThemeMap is the theme map. ThemeMap = make(map[string]ThemeConfig) // ThemeNameArray is the theme name array. ThemeNameArray []string )
Functions ¶
func PersistentThemeConfig ¶ added in v1.7.0
func PersistentThemeConfig(themeName string)
PersistentThemeConfig saves theme config to file
Types ¶
type Color ¶ added in v1.7.0
type Color string
Color is a color string.
const ( // DefaultColor represents a default color. DefaultColor Color = "default" // DefaultTheme represents a default theme. DefaultTheme = "default" )
type Config ¶
type Config struct { RestConfig *rest.Config Theme *ThemeConfig }
Config application configs
type ThemeConfig ¶ added in v1.7.0
type ThemeConfig struct { Info struct { Title Color `yaml:"title"` Text Color `yaml:"text"` } `yaml:"info"` Menu struct { Description Color `yaml:"description"` Key Color `yaml:"key"` } `yaml:"menu"` Logo struct { Text Color `yaml:"text"` } `yaml:"logo"` Crumbs struct { Foreground Color `yaml:"foreground"` Background Color `yaml:"background"` } `yaml:"crumbs"` Border struct { App Color `yaml:"app"` Table Color `yaml:"table"` } `yaml:"border"` Table struct { Title Color `yaml:"title"` Header Color `yaml:"header"` Body Color `yaml:"body"` CursorBg Color `yaml:"cursorbg"` CursorFg Color `yaml:"cursorfg"` } `yaml:"table"` Status struct { Starting Color `yaml:"starting"` Healthy Color `yaml:"healthy"` UnHealthy Color `yaml:"unhealthy"` Waiting Color `yaml:"waiting"` Succeeded Color `yaml:"succeeded"` Failed Color `yaml:"failed"` Unknown Color `yaml:"unknown"` } `yaml:"status"` Yaml struct { Key Color `yaml:"key"` Colon Color `yaml:"colon"` Value Color `yaml:"value"` } `yaml:"yaml"` Topology struct { Line Color `yaml:"line"` App Color `yaml:"app"` Workflow Color `yaml:"workflow"` Component Color `yaml:"component"` Policy Color `yaml:"policy"` Trait Color `yaml:"trait"` Kind Color `yaml:"kind"` } `yaml:"topology"` }
ThemeConfig is the theme config.
func LoadThemeConfig ¶ added in v1.7.0
func LoadThemeConfig() *ThemeConfig
LoadThemeConfig loads theme config from env or use the default setting
Click to show internal directories.
Click to hide internal directories.