feat(tui): branch names look more like 'pills'

Use round brackets
This commit is contained in:
Paul Campbell 2024-08-31 19:20:50 +01:00
parent d2048d8a34
commit 2b09872131

View file

@ -1,3 +1,4 @@
use color_eyre::owo_colors::OwoColorize;
//
use git_next_core::git::graph::Log;
use lazy_static::lazy_static;
@ -84,12 +85,10 @@ impl From<LogLine> for Line<'_> {
branches.sort();
branches
.into_iter()
.map(|branch| Span::from(branch).style(Style::default().fg(Color::Blue)))
.for_each(|span| {
spans.push("[".into());
spans.push(span);
spans.push("]".into());
});
.map(|branch| format!("({branch})"))
.map(Span::from)
.map(|span| span.style(Style::default().fg(Color::White).bg(Color::Blue)))
.for_each(|span| spans.push(span));
spans.push(" ".into());
spans.push(message.into());
Line::from(spans)