feat: Stage 1 scaffold — config, API client, placeholder TUI
Sets up the full project structure following the hactl/gokapi-tui architecture: strict Elm-pattern Bubbletea TUI, YAML config at ~/.config/terdut-tui/config.yaml, REST API client with Bearer auth, self-update via GitHub Releases, and a three-section tab placeholder (Alerts / Schedule / Users) that verifies server connectivity on startup.
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package tui
|
||||
|
||||
import "github.com/charmbracelet/lipgloss"
|
||||
|
||||
var (
|
||||
colorPrimary = lipgloss.Color("69") // blue
|
||||
colorMuted = lipgloss.Color("240") // gray
|
||||
colorFiring = lipgloss.Color("196") // red
|
||||
colorResolved = lipgloss.Color("70") // green
|
||||
colorAccent = lipgloss.Color("214") // orange
|
||||
|
||||
styleHeader = lipgloss.NewStyle().
|
||||
Bold(true).
|
||||
Foreground(colorPrimary).
|
||||
Padding(0, 1)
|
||||
|
||||
styleTabActive = lipgloss.NewStyle().
|
||||
Bold(true).
|
||||
Foreground(lipgloss.Color("0")).
|
||||
Background(colorPrimary).
|
||||
Padding(0, 2)
|
||||
|
||||
styleTabInactive = lipgloss.NewStyle().
|
||||
Foreground(colorMuted).
|
||||
Padding(0, 2)
|
||||
|
||||
styleFooter = lipgloss.NewStyle().
|
||||
Foreground(colorMuted)
|
||||
|
||||
styleStatus = lipgloss.NewStyle().
|
||||
Foreground(colorAccent).
|
||||
Bold(true)
|
||||
|
||||
styleError = lipgloss.NewStyle().
|
||||
Foreground(colorFiring).
|
||||
Bold(true)
|
||||
|
||||
styleFiring = lipgloss.NewStyle().Foreground(colorFiring).Bold(true)
|
||||
styleResolved = lipgloss.NewStyle().Foreground(colorResolved)
|
||||
styleMuted = lipgloss.NewStyle().Foreground(colorMuted)
|
||||
)
|
||||
Reference in New Issue
Block a user