build: Upgraded to Ratatui v0.30.0 and fixed a new security vulnerability [#13]

This commit is contained in:
2026-01-07 17:15:54 -07:00
parent 243de47cae
commit f0ed71b436
43 changed files with 1532 additions and 828 deletions
+24 -24
View File
@@ -1,19 +1,19 @@
#[cfg(test)]
mod test {
use crate::ui::styles::ManagarrStyle;
use crate::ui::styles::{
awaiting_import_style, default_style, downloaded_style, downloading_style, failure_style,
help_style, highlight_style, indeterminate_style, missing_style, primary_style,
secondary_style, success_style, system_function_style, unmonitored_missing_style,
unmonitored_style, unreleased_style, warning_style,
};
use pretty_assertions::assert_eq;
use ratatui::prelude::Modifier;
use ratatui::style::{Color, Style, Stylize};
#[test]
fn test_new() {
assert_eq!(Style::new(), <Style as Default>::default())
}
use ratatui::style::{Color, Style};
#[test]
fn test_style_awaiting_import() {
assert_eq!(
Style::new().awaiting_import(),
awaiting_import_style(),
Style::new().fg(Color::Rgb(255, 170, 66))
);
}
@@ -21,86 +21,86 @@ mod test {
#[test]
fn test_style_indeterminate() {
assert_eq!(
Style::new().indeterminate(),
indeterminate_style(),
Style::new().fg(Color::Rgb(255, 170, 66))
);
}
#[test]
fn test_style_default() {
assert_eq!(Style::new().default(), Style::new().white());
assert_eq!(default_style(), Style::new().white());
}
#[test]
fn test_style_downloaded() {
assert_eq!(Style::new().downloaded(), Style::new().green());
assert_eq!(downloaded_style(), Style::new().green());
}
#[test]
fn test_style_downloading() {
assert_eq!(Style::new().downloading(), Style::new().magenta());
assert_eq!(downloading_style(), Style::new().magenta());
}
#[test]
fn test_style_failure() {
assert_eq!(Style::new().failure(), Style::new().red());
assert_eq!(failure_style(), Style::new().red());
}
#[test]
fn test_style_help() {
assert_eq!(Style::new().help(), Style::new().light_blue());
assert_eq!(help_style(), Style::new().light_blue());
}
#[test]
fn test_style_highlight() {
assert_eq!(
Style::new().highlight(),
highlight_style(),
Style::new().add_modifier(Modifier::REVERSED)
);
}
#[test]
fn test_style_missing() {
assert_eq!(Style::new().missing(), Style::new().red());
assert_eq!(missing_style(), Style::new().red());
}
#[test]
fn test_style_primary() {
assert_eq!(Style::new().primary(), Style::new().cyan());
assert_eq!(primary_style(), Style::new().cyan());
}
#[test]
fn test_style_secondary() {
assert_eq!(Style::new().secondary(), Style::new().yellow());
assert_eq!(secondary_style(), Style::new().yellow());
}
#[test]
fn test_style_success() {
assert_eq!(Style::new().success(), Style::new().green());
assert_eq!(success_style(), Style::new().green());
}
#[test]
fn test_style_system_function() {
assert_eq!(Style::new().system_function(), Style::new().yellow());
assert_eq!(system_function_style(), Style::new().yellow());
}
#[test]
fn test_style_unmonitored() {
assert_eq!(Style::new().unmonitored(), Style::new().gray());
assert_eq!(unmonitored_style(), Style::new().gray());
}
#[test]
fn test_style_unmonitored_missing() {
assert_eq!(Style::new().unmonitored_missing(), Style::new().yellow());
assert_eq!(unmonitored_missing_style(), Style::new().yellow());
}
#[test]
fn test_style_unreleased() {
assert_eq!(Style::new().unreleased(), Style::new().light_cyan());
assert_eq!(unreleased_style(), Style::new().light_cyan());
}
#[test]
fn test_style_warning() {
assert_eq!(Style::new().warning(), Style::new().magenta());
assert_eq!(warning_style(), Style::new().magenta());
}
}