Change progress bar style (#718)

* Bump indicatif from 0.16.2 to 0.17.0

Bumps [indicatif](https://github.com/console-rs/indicatif) from 0.16.2 to 0.17.0.
- [Release notes](https://github.com/console-rs/indicatif/releases)
- [Commits](https://github.com/console-rs/indicatif/compare/0.16.2...0.17.0)

---
updated-dependencies:
- dependency-name: indicatif
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update progress bar setup

* Change progress bar style

* Use pink for spinner
* Show ETA instead of elapsed
* dim progress bar and adjust size to terminal width

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Matthias Endler 2022-12-22 15:29:45 +01:00 committed by GitHub
parent 5ab90ba35a
commit 15d8024c7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,11 +127,10 @@ async fn progress_bar_task(
fn init_progress_bar() -> ProgressBar {
let bar = ProgressBar::new_spinner().with_style(
ProgressStyle::default_bar()
.template(
"{spinner:.red.bright} {pos}/{len:.dim} [{elapsed_precise}] {bar:25} {wide_msg}",
)
.expect("Valid progress bar"),
ProgressStyle::with_template(
"{spinner:.197.bright} {pos}/{len:.dim} ETA {eta} {bar:.dim} {wide_msg}",
)
.expect("Valid progress bar"),
);
bar.set_length(0);
bar.set_message("Extracting links");