renderWorktreeInfoLine renders the branch and directory info line for the header.
()
| 141 | |
| 142 | // renderWorktreeInfoLine renders the branch and directory info line for the header. |
| 143 | func (a *App) renderWorktreeInfoLine() string { |
| 144 | branch, dir := a.getWorktreeInfo() |
| 145 | if branch == "" { |
| 146 | return "" |
| 147 | } |
| 148 | |
| 149 | branchLabel := SubtitleStyle.Render("branch:") |
| 150 | branchValue := lipgloss.NewStyle().Foreground(PrimaryColor).Render(" " + branch) |
| 151 | dirLabel := SubtitleStyle.Render(" dir:") |
| 152 | dirValue := lipgloss.NewStyle().Foreground(TextColor).Render(" " + dir) |
| 153 | |
| 154 | return lipgloss.JoinHorizontal(lipgloss.Center, " ", branchLabel, branchValue, dirLabel, dirValue) |
| 155 | } |
| 156 | |
| 157 | // renderHeader renders the header with branding, state, iteration, and elapsed time. |
| 158 | func (a *App) renderHeader() string { |