Added error windows with scrolling text, and a colorized Radarr logo. Also added header row with header tabs

This commit is contained in:
2023-08-08 10:50:04 -06:00
parent daf08c10cc
commit 44db47f8ee
8 changed files with 154 additions and 24 deletions
+15
View File
@@ -106,6 +106,10 @@ pub fn style_failure() -> Style {
Style::default().fg(Color::Red)
}
pub fn style_help() -> Style {
Style::default().fg(Color::LightBlue)
}
pub fn title_style(title: &str) -> Span<'_> {
Span::styled(title, style_bold())
}
@@ -114,6 +118,17 @@ pub fn title_block(title: &str) -> Block<'_> {
layout_block_with_title(title_style(title))
}
pub fn logo_block<'a>() -> Block<'a> {
Block::default().borders(Borders::ALL).title(Span::styled(
"Managarr - A Servarr management TUI",
Style::default()
.fg(Color::Black)
.bg(Color::LightGreen)
.add_modifier(Modifier::BOLD)
.add_modifier(Modifier::ITALIC),
))
}
pub fn centered_rect(percent_x: u16, percent_y: u16, r: Rect) -> Rect {
let popup_layout = Layout::default()
.direction(Direction::Vertical)