init
Release Please / release-please (push) Failing after 4m2s
Web CI / web typecheck + build (push) Successful in 3m39s
CodeQL Analysis / Analyze (javascript-typescript) (push) Failing after 1h1m49s
CodeQL Analysis / Analyze (go) (push) Failing after 1h1m49s

This commit is contained in:
redlineo committed 2026-07-13 10:14:00 +03:00
commit d295c7f139
1527 files changed
+270726

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
// Package theme provides the visual theme system for the dashboard.
package theme
import (
"github.com/charmbracelet/lipgloss"
"github.com/muesli/termenv"
)
// Theme holds all color definitions for the pipeline dashboard.
type Theme struct {
// Base colors
Base lipgloss.Color
Surface lipgloss.Color
Overlay lipgloss.Color
Text lipgloss.Color
Subtext lipgloss.Color
// Accent colors
Blue lipgloss.Color
Mauve lipgloss.Color
Green lipgloss.Color
Yellow lipgloss.Color
Sky lipgloss.Color
Peach lipgloss.Color
Red lipgloss.Color
Pink lipgloss.Color
}
// NewTheme creates a theme by name. Use "auto" or "" to detect from terminal background.
func NewTheme(name string) Theme {
switch name {
case "catppuccin-mocha":
return newCatppuccinMocha()
case "catppuccin-latte":
return newCatppuccinLatte()
case "auto", "":
if termenv.HasDarkBackground() {
return newCatppuccinMocha()
}
return newCatppuccinLatte()
default:
return newCatppuccinMocha()
}
}