Skip to content

Commit

Permalink
refactor: update extract_covers.rs to remove section label
Browse files Browse the repository at this point in the history
  • Loading branch information
Kremilly committed Aug 14, 2024
1 parent 1814816 commit 6d0a496
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
1 change: 0 additions & 1 deletion src/ext/extract_covers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ impl ExtractCovers {
FileUtils::create_path(&covers_path);

UI::section_header("Extracting covers", "normal");
UI::section_label("To use this feature, install dependencies with `scimon --options install-requirements`", "warning");

let pdf_path = &Vars::get_path(contents);
let code = &Remote::content(Addons::EXTRACT_COVERS_PLUGIN).await?;
Expand Down
14 changes: 1 addition & 13 deletions src/ui/ui_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,13 @@ impl UI {
"info" => text.bold().blue(),
"warning" => text.bold().yellow(),
"error" => text.bold().red(),
"success" => text.bold().green(),
_ => text.bold(),
};

println!("");
println!("{}", message);
}

pub fn section_label(text: &str, level: &str) {
let message = match level {
"normal" => text.bold(),
"info" => text.bold().blue(),
"warning" => text.bold().yellow(),
"error" => text.bold().red(),
"success" => text.bold().green(),
_ => text.bold(),
};

println!("└─> {}", message);
}

pub fn pb_template() -> ProgressStyle {
ProgressStyle::with_template(
Expand Down

0 comments on commit 6d0a496

Please sign in to comment.