mirror of
https://github.com/AmanTahiliani/box-box.git
synced 2026-08-08 12:07:23 -04:00
Tel Updates
This commit is contained in:
@@ -102,6 +102,7 @@ func (m AppModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
m.height = msg.Height
|
||||
contentHeight := m.height - 5 // tab bar(2) + status bar + help + spacing
|
||||
m.raceDetail.SetSize(m.width-4, contentHeight)
|
||||
m.live.SetSize(m.width, contentHeight)
|
||||
var cmd1, cmd2, cmd3, cmd4, cmd5, cmd6 tea.Cmd
|
||||
m.dashboard, cmd1 = m.dashboard.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
|
||||
cacheStats := m.client.CacheStats()
|
||||
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)
|
||||
rightW := lipgloss.Width(right)
|
||||
|
||||
@@ -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.
|
||||
type RaceDetailKeyMap struct {
|
||||
ScrollUp key.Binding
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -13,6 +13,7 @@ const (
|
||||
colorYellow = "#FFD700"
|
||||
colorOrange = "#FF8700"
|
||||
colorCyan = "#00BFFF"
|
||||
colorPurple = "#A855F7"
|
||||
|
||||
// Surfaces
|
||||
colorSurface0 = "#1B1B2F"
|
||||
@@ -256,6 +257,11 @@ var (
|
||||
|
||||
styleDry = lipgloss.NewStyle().
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user