summaryrefslogtreecommitdiff
path: root/internal/ui
diff options
context:
space:
mode:
authorPaul Bütow <1224732+snonux@users.noreply.github.com>2025-06-21 20:02:42 +0300
committerPaul Bütow <1224732+snonux@users.noreply.github.com>2025-06-21 20:02:42 +0300
commit8046421e7c47b8a7cc8775589ce150e05f3a2cab (patch)
tree5098190e0b439ccfb5179b32899c23729b3ec1eb /internal/ui
parentb77839545023cb39ab2f9d2a2717c641aeb3a588 (diff)
Move column header to cell view
Diffstat (limited to 'internal/ui')
-rw-r--r--internal/ui/table.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/internal/ui/table.go b/internal/ui/table.go
index dd862a5..fd9ee8f 100644
--- a/internal/ui/table.go
+++ b/internal/ui/table.go
@@ -549,12 +549,7 @@ func (m Model) statusLine() string {
}
func (m Model) topStatusLine() string {
- header := ""
- cols := m.tbl.Columns()
- if idx := m.tbl.ColumnCursor(); idx >= 0 && idx < len(cols) {
- header = cols[idx].Title
- }
- line := fmt.Sprintf("Task Samurai %s | %s", internal.Version, header)
+ line := fmt.Sprintf("Task Samurai %s", internal.Version)
return lipgloss.NewStyle().
Foreground(lipgloss.Color("229")).
Background(lipgloss.Color("57")).
@@ -767,6 +762,14 @@ func (m Model) expandedCellView() string {
}
val = strings.Join(anns, "; ")
}
+ header := ""
+ cols := m.tbl.Columns()
+ if col >= 0 && col < len(cols) {
+ header = cols[col].Title
+ }
+ if header != "" {
+ val = header + ": " + val
+ }
style := lipgloss.NewStyle().Width(m.tbl.Width())
return style.Render(val)
}