Tel Updates

This commit is contained in:
2026-03-08 00:32:33 -05:00
parent b1b601304a
commit 7c2fcfef8d
4 changed files with 1154 additions and 137 deletions

View File

@@ -102,6 +102,7 @@ func (m AppModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.height = msg.Height m.height = msg.Height
contentHeight := m.height - 5 // tab bar(2) + status bar + help + spacing contentHeight := m.height - 5 // tab bar(2) + status bar + help + spacing
m.raceDetail.SetSize(m.width-4, contentHeight) m.raceDetail.SetSize(m.width-4, contentHeight)
m.live.SetSize(m.width, contentHeight)
var cmd1, cmd2, cmd3, cmd4, cmd5, cmd6 tea.Cmd var cmd1, cmd2, cmd3, cmd4, cmd5, cmd6 tea.Cmd
m.dashboard, cmd1 = m.dashboard.Update(msg) m.dashboard, cmd1 = m.dashboard.Update(msg)
m.live, cmd2 = m.live.Update(msg) m.live, cmd2 = m.live.Update(msg)
@@ -490,7 +491,7 @@ func (m AppModel) renderStatusBar(width int) string {
// Right side: cache stats + navigation hints // Right side: cache stats + navigation hints
cacheStats := m.client.CacheStats() cacheStats := m.client.CacheStats()
cacheInfo := styleMuted.Render(fmt.Sprintf("cache %d/%d", cacheStats.Hits, cacheStats.Hits+cacheStats.Misses)) cacheInfo := styleMuted.Render(fmt.Sprintf("cache %d/%d", cacheStats.Hits, cacheStats.Hits+cacheStats.Misses))
right := cacheInfo + " " + styleMuted.Render("1-4 tabs · y year · q quit") right := cacheInfo + " " + styleMuted.Render("1-6 tabs · y year · q quit")
leftW := lipgloss.Width(left) leftW := lipgloss.Width(left)
rightW := lipgloss.Width(right) rightW := lipgloss.Width(right)

View File

@@ -122,6 +122,43 @@ var StandingsKeys = StandingsKeyMap{
), ),
} }
// LiveKeyMap holds keybindings specific to the live timing tab.
type LiveKeyMap struct {
ToggleSectors key.Binding
ToggleRC key.Binding
ScrollRCUp key.Binding
ScrollRCDown key.Binding
ExpandDriver key.Binding
Collapse key.Binding
}
var LiveKeys = LiveKeyMap{
ToggleSectors: key.NewBinding(
key.WithKeys("s"),
key.WithHelp("s", "toggle sectors"),
),
ToggleRC: key.NewBinding(
key.WithKeys("r"),
key.WithHelp("r", "toggle RC panel"),
),
ScrollRCUp: key.NewBinding(
key.WithKeys("K"),
key.WithHelp("K", "scroll RC up"),
),
ScrollRCDown: key.NewBinding(
key.WithKeys("J"),
key.WithHelp("J", "scroll RC down"),
),
ExpandDriver: key.NewBinding(
key.WithKeys("enter"),
key.WithHelp("enter", "driver detail"),
),
Collapse: key.NewBinding(
key.WithKeys("esc", "b"),
key.WithHelp("esc/b", "collapse"),
),
}
// RaceDetailKeyMap holds keybindings for the race detail tab. // RaceDetailKeyMap holds keybindings for the race detail tab.
type RaceDetailKeyMap struct { type RaceDetailKeyMap struct {
ScrollUp key.Binding ScrollUp key.Binding

File diff suppressed because it is too large Load Diff

View File

@@ -13,6 +13,7 @@ const (
colorYellow = "#FFD700" colorYellow = "#FFD700"
colorOrange = "#FF8700" colorOrange = "#FF8700"
colorCyan = "#00BFFF" colorCyan = "#00BFFF"
colorPurple = "#A855F7"
// Surfaces // Surfaces
colorSurface0 = "#1B1B2F" colorSurface0 = "#1B1B2F"
@@ -256,6 +257,11 @@ var (
styleDry = lipgloss.NewStyle(). styleDry = lipgloss.NewStyle().
Foreground(lipgloss.Color(colorGreen)) Foreground(lipgloss.Color(colorGreen))
// Purple for overall session best
stylePurple = lipgloss.NewStyle().
Foreground(lipgloss.Color(colorPurple)).
Bold(true)
) )
// DefaultTableStyles returns a base style map for bubbles/table. // DefaultTableStyles returns a base style map for bubbles/table.