diff --git a/ui/pages/repo/repo.go b/ui/pages/repo/repo.go index 5d0d4a58b..16b21ac3e 100644 --- a/ui/pages/repo/repo.go +++ b/ui/pages/repo/repo.go @@ -310,10 +310,7 @@ func (r *Repo) headerView() string { } else { desc = r.common.Styles.Repo.HeaderDesc.Render(desc) } - // TODO move this into a style. - urlStyle := lipgloss.NewStyle(). - MarginLeft(1). - Foreground(lipgloss.Color("168")). + urlStyle := r.common.Styles.URLStyle.Copy(). Width(r.common.Width - lipgloss.Width(desc) - 1). Align(lipgloss.Right) url := git.RepoURL(cfg.Host, cfg.Port, r.selectedRepo.Repo()) diff --git a/ui/styles/styles.go b/ui/styles/styles.go index 4e1c14440..f596a09a1 100644 --- a/ui/styles/styles.go +++ b/ui/styles/styles.go @@ -53,6 +53,7 @@ type Styles struct { HelpKey lipgloss.Style HelpValue lipgloss.Style HelpDivider lipgloss.Style + URLStyle lipgloss.Style Error lipgloss.Style ErrorTitle lipgloss.Style @@ -257,6 +258,10 @@ func DefaultStyles() *Styles { Foreground(lipgloss.Color("237")). SetString(" • ") + s.URLStyle = lipgloss.NewStyle(). + MarginLeft(1). + Foreground(lipgloss.Color("168")) + s.Error = lipgloss.NewStyle(). MarginTop(2)