Skip to content

Commit 6c24430

Browse files
authored
Add background color to log table entry (#148)
1 parent a4ad7cc commit 6c24430

File tree

1 file changed

+14
-0
lines changed
  • tunnel/internal/client/tui

1 file changed

+14
-0
lines changed

tunnel/internal/client/tui/tui.go

+14
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,20 @@ func (m *model) AddLog(msg AddLogMsg) {
400400
// Combine new row with existing rows
401401
allRows := append(rows, existingRows...)
402402
m.table.SetRows(allRows)
403+
404+
// Set styles only when we have actual log messages
405+
s := table.DefaultStyles()
406+
s.Header = s.Header.
407+
BorderStyle(lipgloss.NormalBorder()).
408+
BorderForeground(lipgloss.Color("240")).
409+
BorderBottom(true).
410+
Bold(false)
411+
412+
s.Selected = s.Selected.
413+
Foreground(lipgloss.Color("229")).
414+
Background(lipgloss.Color("57")).
415+
Bold(false)
416+
m.table.SetStyles(s)
403417
}
404418

405419
// Add method to handle debug logs

0 commit comments

Comments
 (0)