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

@@ -275,7 +275,15 @@ pub unsafe extern "C" fn dc_get_connectivity_html(
return "".strdup();
}
let ctx = &*context;
block_on(async move { ctx.get_connectivity_html().await.strdup() })
block_on(async move {
match ctx.get_connectivity_html().await {
Ok(html) => html.strdup(),
Err(err) => {
error!(ctx, "Failed to get connectivity html: {}", err);
"".strdup()
}
}
})
}
#[no_mangle]