diff options
| author | Naz <ndpm13@ch-naseem.com> | 2025-07-27 14:42:21 +0100 |
|---|---|---|
| committer | Naz <ndpm13@ch-naseem.com> | 2025-07-27 14:42:21 +0100 |
| commit | ccf603c81bd11864aabae5e98c9888854fe885cb (patch) | |
| tree | 2e7d064f97e2e6a4e6d0435bdcceee786faf8d26 /src/tui.rs | |
| parent | 85fb9fcc50d16f8b8147c117521b836ab750cd98 (diff) | |
✨feat: add AppImage download with progress tracking
Diffstat (limited to 'src/tui.rs')
| -rw-r--r-- | src/tui.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tui.rs b/src/tui.rs new file mode 100644 index 0000000..df3504d --- /dev/null +++ b/src/tui.rs @@ -0,0 +1,14 @@ +use indicatif::{ProgressBar, ProgressStyle}; + +pub fn make_progress_bar(size: u64) -> ProgressBar { + let bar = ProgressBar::new(size); + bar.set_style( + ProgressStyle::with_template( + "{elapsed_precise:.white.dim} {wide_bar:.cyan} {bytes}/{total_bytes} ({bytes_per_sec}, {eta})", + ) + .unwrap() + .progress_chars("█▉▊▋▌▍▎▏ "), + ); + + bar +} |
