Documentation
¶
Index ¶
- func GetAllThemes() map[string]*Theme
- type AnimatedProgressBar
- type AnimationConfig
- type ColorScheme
- type EnhancedDashboard
- type KeyMap
- type Spacing
- type TabType
- type Theme
- func (t *Theme) ButtonStyle(active bool) lipgloss.Style
- func (t *Theme) CardStyle() lipgloss.Style
- func (t *Theme) ErrorStyle() lipgloss.Style
- func (t *Theme) HeaderStyle() lipgloss.Style
- func (t *Theme) InfoStyle() lipgloss.Style
- func (t *Theme) MutedStyle() lipgloss.Style
- func (t *Theme) ProgressBarStyle() lipgloss.Style
- func (t *Theme) SuccessStyle() lipgloss.Style
- type ThemeManager
- type Typography
- type XPProgressRenderer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnimatedProgressBar ¶ added in v0.10.1
type AnimatedProgressBar struct {
// contains filtered or unexported fields
}
AnimatedProgressBar represents an animated progress bar
func NewAnimatedProgressBar ¶ added in v0.10.1
func NewAnimatedProgressBar(width int) *AnimatedProgressBar
NewAnimatedProgressBar creates a new animated progress bar
func (*AnimatedProgressBar) IsAnimating ¶ added in v0.10.1
func (apb *AnimatedProgressBar) IsAnimating() bool
IsAnimating returns true if the progress bar is currently animating
func (*AnimatedProgressBar) Render ¶ added in v0.10.1
func (apb *AnimatedProgressBar) Render() string
Render renders the animated progress bar
func (*AnimatedProgressBar) Update ¶ added in v0.10.1
func (apb *AnimatedProgressBar) Update(targetPercent float64)
Update updates the progress bar animation
type AnimationConfig ¶
AnimationConfig defines animation settings
type ColorScheme ¶
type ColorScheme struct {
Primary lipgloss.Color // 主色调
Secondary lipgloss.Color // 辅助色
Accent lipgloss.Color // 强调色
Background lipgloss.Color // 背景色
Surface lipgloss.Color // 表面色
Text lipgloss.Color // 文本色
TextMuted lipgloss.Color // 次要文本色
Success lipgloss.Color // 成功色
Warning lipgloss.Color // 警告色
Error lipgloss.Color // 错误色
Info lipgloss.Color // 信息色
}
ColorScheme defines the color palette for a theme
type EnhancedDashboard ¶
type EnhancedDashboard struct {
// contains filtered or unexported fields
}
EnhancedDashboard represents the new enhanced TUI dashboard
func NewEnhancedDashboard ¶
func NewEnhancedDashboard(db *database.DB) *EnhancedDashboard
NewEnhancedDashboard creates a new enhanced dashboard
func (*EnhancedDashboard) Init ¶
func (d *EnhancedDashboard) Init() tea.Cmd
Init initializes the dashboard
func (*EnhancedDashboard) SetModePreference ¶
func (d *EnhancedDashboard) SetModePreference(mode string)
SetModePreference sets the preferred display mode
func (*EnhancedDashboard) View ¶
func (d *EnhancedDashboard) View() string
View renders the dashboard
type KeyMap ¶
type KeyMap struct {
Quit key.Binding
Help key.Binding
Refresh key.Binding
NextTab key.Binding
PrevTab key.Binding
Settings key.Binding
}
KeyMap defines keyboard shortcuts
type Theme ¶
type Theme struct {
Name string
Colors ColorScheme
Typography Typography
Spacing Spacing
Animations AnimationConfig
}
Theme represents a complete UI theme
func DefaultSpaceTheme ¶
func DefaultSpaceTheme() *Theme
DefaultSpaceTheme returns the default space theme
func (*Theme) ErrorStyle ¶
func (*Theme) HeaderStyle ¶
Style helpers for common UI elements
func (*Theme) MutedStyle ¶
func (*Theme) ProgressBarStyle ¶
func (*Theme) SuccessStyle ¶
type ThemeManager ¶
type ThemeManager struct {
// contains filtered or unexported fields
}
ThemeManager manages theme switching and persistence
func NewThemeManager ¶
func NewThemeManager() *ThemeManager
NewThemeManager creates a new theme manager
func (*ThemeManager) GetAvailableThemes ¶
func (tm *ThemeManager) GetAvailableThemes() []string
GetAvailableThemes returns a list of available theme names
func (*ThemeManager) GetCurrentTheme ¶
func (tm *ThemeManager) GetCurrentTheme() *Theme
GetCurrentTheme returns the current active theme
func (*ThemeManager) SetTheme ¶
func (tm *ThemeManager) SetTheme(name string) error
SetTheme switches to a different theme
type Typography ¶
Typography defines text styling
type XPProgressRenderer ¶ added in v0.10.1
type XPProgressRenderer struct {
// contains filtered or unexported fields
}
XPProgressRenderer handles XP progress rendering with animations
func NewXPProgressRenderer ¶ added in v0.10.1
func NewXPProgressRenderer() *XPProgressRenderer
NewXPProgressRenderer creates a new XP progress renderer
func (*XPProgressRenderer) RenderXPProgress ¶ added in v0.10.1
func (xpr *XPProgressRenderer) RenderXPProgress(currentXP, currentLevel int) string
RenderXPProgress renders animated XP progress