tweak quota display (#2616)

* resultify get_connectivity_html()

* tweak quota titles, avoid confusing 'quota' wording

* show bars for quota usage

* skip secondady 'Storage' title, see comment for reasoning
This commit is contained in:
bjoern
2021-08-22 12:46:46 +02:00
committed by GitHub
parent 3440daca1a
commit d0c97bce4c
3 changed files with 65 additions and 22 deletions

View File

@@ -514,9 +514,15 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
let file = dirs::home_dir()
.unwrap_or_default()
.join("connectivity.html");
let html = context.get_connectivity_html().await;
fs::write(&file, html)?;
println!("Report written to: {:#?}", file);
match context.get_connectivity_html().await {
Ok(html) => {
fs::write(&file, html)?;
println!("Report written to: {:#?}", file);
}
Err(err) => {
bail!("Failed to get connectivity html: {}", err);
}
}
}
"maybenetwork" => {
context.maybe_network().await;