feat(tui): zebra striping, detail breadcrumb, sparkline stats, collapse persistence
Add alternating row backgrounds for easier table scanning. Detail panel now shows breadcrumb path (Sites > Group > Name) and min/avg/max latency stats below the sparkline. Group collapse state persists across restarts via new preferences table in both SQLite and Postgres.
This commit is contained in:
@@ -21,6 +21,10 @@ var (
|
||||
|
||||
tableBorderStyle = lipgloss.NewStyle().
|
||||
Foreground(lipgloss.Color("#444"))
|
||||
|
||||
tableZebraStyle = lipgloss.NewStyle().
|
||||
Padding(0, 1).
|
||||
Background(lipgloss.Color("#1a1a2e"))
|
||||
)
|
||||
|
||||
type StyleOverride func(row, col int) *lipgloss.Style
|
||||
@@ -67,6 +71,9 @@ func (m Model) renderTable(headers []string, items int, buildRows func(start, en
|
||||
}
|
||||
}
|
||||
base := tableCellStyle
|
||||
if row%2 == 1 {
|
||||
base = tableZebraStyle
|
||||
}
|
||||
if isSelected {
|
||||
base = tableSelectedStyle
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user