summaryrefslogtreecommitdiffhomepage
path: root/internal/tui/components/logs
diff options
context:
space:
mode:
authorKujtim Hoxha <[email protected]>2025-05-01 12:48:19 +0200
committeradamdottv <[email protected]>2025-05-01 11:07:47 -0500
commite4680caebb7235988450f6b1d59da2e46a78e567 (patch)
tree94b4a560276748b86c67684b6c3053d587076787 /internal/tui/components/logs
parente760d28c5a125f7f4de30cf0491be53e32bb897d (diff)
downloadopencode-e4680caebb7235988450f6b1d59da2e46a78e567.tar.gz
opencode-e4680caebb7235988450f6b1d59da2e46a78e567.zip
some small fixes
Diffstat (limited to 'internal/tui/components/logs')
-rw-r--r--internal/tui/components/logs/table.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/tui/components/logs/table.go b/internal/tui/components/logs/table.go
index b9386cb73..8d59f967f 100644
--- a/internal/tui/components/logs/table.go
+++ b/internal/tui/components/logs/table.go
@@ -63,6 +63,9 @@ func (i *tableCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
func (i *tableCmp) View() string {
t := theme.CurrentTheme()
+ defaultStyles := table.DefaultStyles()
+ defaultStyles.Selected = defaultStyles.Selected.Foreground(t.Primary())
+ i.table.SetStyles(defaultStyles)
return styles.ForceReplaceBackgroundWithLipgloss(i.table.View(), t.Background())
}
@@ -116,7 +119,6 @@ func (i *tableCmp) setRows() {
}
func NewLogsTable() TableComponent {
- t := theme.CurrentTheme()
columns := []table.Column{
{Title: "ID", Width: 4},
{Title: "Time", Width: 4},
@@ -124,11 +126,9 @@ func NewLogsTable() TableComponent {
{Title: "Message", Width: 10},
{Title: "Attributes", Width: 10},
}
- defaultStyles := table.DefaultStyles()
- defaultStyles.Selected = defaultStyles.Selected.Foreground(t.Primary())
+
tableModel := table.New(
table.WithColumns(columns),
- table.WithStyles(defaultStyles),
)
tableModel.Focus()
return &tableCmp{