Adding description to the header

This commit is contained in:
Marco De Araujo 2025-12-25 12:13:09 -04:00
parent 44a1c2055e
commit bb57f3264e
2 changed files with 7 additions and 10 deletions

View file

@ -14,10 +14,17 @@ pub fn render_header(frame: &mut Frame, area: Rect, state: &DashboardViewState)
} else {
format!("{} - {}", t("dashboard-header"), state.title)
};
let description = state
.descriptions
.as_ref()
.filter(|s| !s.trim().is_empty())
.map(|s| format!(" - {}", s))
.unwrap_or("".to_string());
let header = Paragraph::new(Line::from(vec![
Span::styled("📈 ", Style::default().fg(Color::Cyan)),
Span::styled(title, Style::default().fg(Color::White).bold()),
Span::styled(description, Style::default().fg(Color::White).bold()),
]))
.alignment(Alignment::Center)
.block(