summaryrefslogtreecommitdiffhomepage
path: root/internal/tui/components/logs/table.go
diff options
context:
space:
mode:
authoradamdottv <[email protected]>2025-04-28 08:46:09 -0500
committeradamdottv <[email protected]>2025-04-30 07:46:34 -0500
commit61b605e724eb4cc50ab831534fcdd18e031d68eb (patch)
treeb15b074a8fed1931e179a8d3df08d05b753c7aa3 /internal/tui/components/logs/table.go
parent61d9dc95111d2645a49816f6d9d6cc1014be1a22 (diff)
downloadopencode-61b605e724eb4cc50ab831534fcdd18e031d68eb.tar.gz
opencode-61b605e724eb4cc50ab831534fcdd18e031d68eb.zip
feat: themes
Diffstat (limited to 'internal/tui/components/logs/table.go')
-rw-r--r--internal/tui/components/logs/table.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/tui/components/logs/table.go b/internal/tui/components/logs/table.go
index bffa7b1ad..b9386cb73 100644
--- a/internal/tui/components/logs/table.go
+++ b/internal/tui/components/logs/table.go
@@ -11,6 +11,7 @@ import (
"github.com/opencode-ai/opencode/internal/pubsub"
"github.com/opencode-ai/opencode/internal/tui/layout"
"github.com/opencode-ai/opencode/internal/tui/styles"
+ "github.com/opencode-ai/opencode/internal/tui/theme"
"github.com/opencode-ai/opencode/internal/tui/util"
)
@@ -61,7 +62,8 @@ func (i *tableCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
func (i *tableCmp) View() string {
- return styles.ForceReplaceBackgroundWithLipgloss(i.table.View(), styles.Background)
+ t := theme.CurrentTheme()
+ return styles.ForceReplaceBackgroundWithLipgloss(i.table.View(), t.Background())
}
func (i *tableCmp) GetSize() (int, int) {
@@ -114,6 +116,7 @@ func (i *tableCmp) setRows() {
}
func NewLogsTable() TableComponent {
+ t := theme.CurrentTheme()
columns := []table.Column{
{Title: "ID", Width: 4},
{Title: "Time", Width: 4},
@@ -122,7 +125,7 @@ func NewLogsTable() TableComponent {
{Title: "Attributes", Width: 10},
}
defaultStyles := table.DefaultStyles()
- defaultStyles.Selected = defaultStyles.Selected.Foreground(styles.Primary)
+ defaultStyles.Selected = defaultStyles.Selected.Foreground(t.Primary())
tableModel := table.New(
table.WithColumns(columns),
table.WithStyles(defaultStyles),