Skip to content

Commit

Permalink
Show "git clone" command in header, unless we're on config
Browse files Browse the repository at this point in the history
  • Loading branch information
Toby Padilla committed Aug 20, 2021
1 parent 1e101cf commit 73ccd13
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tui/bubbles/repo/bubble.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,15 @@ func (b Bubble) headerView() string {
ts = ts.Copy().BorderForeground(b.styles.ActiveBorderColor)
ns = ns.Copy().BorderForeground(b.styles.ActiveBorderColor)
}
var gc string
n := b.name
if n == "config" {
n = "Home"
} else {
gc = fmt.Sprintf("git clone %s", b.sshAddress())
}
title := ts.Render(n)
note := ns.Width(b.width - b.widthMargin - lipgloss.Width(title)).Render(b.sshAddress())
note := ns.Width(b.width - b.widthMargin - lipgloss.Width(title)).Render(gc)
return lipgloss.JoinHorizontal(lipgloss.Top, title, note)
}

Expand Down

0 comments on commit 73ccd13

Please sign in to comment.