refactor(tui): simplify repo identity widget

Adds blue to repo alias
This commit is contained in:
Paul Campbell 2024-08-31 13:23:18 +01:00
parent a2940ec753
commit 97b685363a

View file

@ -1,5 +1,6 @@
// //
use color_eyre::owo_colors::OwoColorize;
use git_next_core::{RepoAlias, RepoBranches}; use git_next_core::{RepoAlias, RepoBranches};
use ratatui::{ use ratatui::{
layout::Alignment, layout::Alignment,
@ -56,12 +57,13 @@ impl<'a> Identity<'a> {
.map(RepoBranches::dev) .map(RepoBranches::dev)
.map_or_else(|| "_".to_string(), |b| b.to_string()); .map_or_else(|| "_".to_string(), |b| b.to_string());
vec![ vec![
Span::from(format!(" {repo_alias} ({label}) ")), " ".into(),
Span::from(repo_alias.to_string()).style(Style::default().fg(Color::Blue)),
format!(" ({label}) ").into(),
alert, alert,
Span::from(format!("({main}/{next}/{dev}) [")), format!("({main}/{next}/{dev}) [").into(),
message.into(), message.into(),
// Span::from(message.}, "] ".into(),
Span::from("] "),
] ]
} }
} }