Project>project overview from the dashboard endpoint; tools chooser drawn in Board>board; docs for Shell and t
This commit is contained in:
16
tui/board.go
16
tui/board.go
@@ -355,6 +355,17 @@ func (m boardModel) View() string {
|
||||
m.width, m.height))
|
||||
}
|
||||
|
||||
if m.tools {
|
||||
entries := make([][2]string, 0, len(tools))
|
||||
for i, t := range tools {
|
||||
mark := " "
|
||||
if i == m.toolAt {
|
||||
mark = "▸ "
|
||||
}
|
||||
entries = append(entries, [2]string{mark + t.name, t.about})
|
||||
}
|
||||
return helpOverlay("open a tool pane here", entries, m.width, m.height)
|
||||
}
|
||||
if m.showHelp {
|
||||
return helpOverlay("keys on this panel", [][2]string{
|
||||
{"↑ ↓ j k", "choose a task"},
|
||||
@@ -517,7 +528,10 @@ func (m boardModel) treeLines(width int) []string {
|
||||
// makes the groups visible at a glance without a box around every one.
|
||||
func groupHeading(name string, count, width int) string {
|
||||
label := lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color(active.Mauve)).Render(strings.ToUpper(name))
|
||||
n := lipgloss.NewStyle().Foreground(lipgloss.Color(active.Muted)).Render(fmt.Sprintf(" %d ", count))
|
||||
n := ""
|
||||
if count >= 0 {
|
||||
n = lipgloss.NewStyle().Foreground(lipgloss.Color(active.Muted)).Render(fmt.Sprintf(" %d ", count))
|
||||
}
|
||||
rule := strings.Repeat("─", max(0, width-lipgloss.Width(label)-lipgloss.Width(n)))
|
||||
return label + dimStyle().Render(rule) + n
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user