feat: refine sidebar UI and update download categories

- Restructured layout so the sidebar acts as an edge-to-edge curved layer with a shadow
- Replaced old download categories with Musics, Movies, Compressed, Documents, Pictures, Applications, and Other
- Updated Settings > Locations tab to handle the new categories
- Added extensive predefined file extensions for smart auto-categorization of downloads
This commit is contained in:
NimBold
2026-06-13 00:02:07 +03:30
parent 610eda203e
commit dc9289fece
10 changed files with 137 additions and 48 deletions
+13
View File
@@ -0,0 +1,13 @@
use regex::Regex;
fn main() {
let pct_re = Regex::new(r"\[download\]\s+(\d+(?:\.\d+)?)%").unwrap();
let line = "[download] 0.0% of 15.59MiB at 7.28KiB/s ETA 36:34";
if line.contains("[download]") && line.contains("%") {
let fraction = pct_re.captures(&line)
.and_then(|cap| cap.get(1))
.and_then(|m| m.as_str().parse::<f64>().ok())
.unwrap_or(0.0) / 100.0;
println!("Fraction: {}", fraction);
}
}