Add loading completed status
This commit is contained in:
@@ -83,9 +83,15 @@ pub fn Status() -> impl IntoView {
|
|||||||
if let Some(progress) = &*state.import_progress().read() {
|
if let Some(progress) = &*state.import_progress().read() {
|
||||||
let filename = format!("Filename: {}", progress.filename);
|
let filename = format!("Filename: {}", progress.filename);
|
||||||
let status = format!("Loading: {} of {} bytes.", progress.loaded, progress.total);
|
let status = format!("Loading: {} of {} bytes.", progress.loaded, progress.total);
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<p>{filename}</p>
|
<p>{filename}</p>
|
||||||
<p>{status}</p>
|
<p>{status}</p>
|
||||||
|
{if progress.loaded == progress.total {
|
||||||
|
view! { <p>"Loading completed"</p> }.into_any()
|
||||||
|
} else {
|
||||||
|
().into_any()
|
||||||
|
}}
|
||||||
}
|
}
|
||||||
.into_any()
|
.into_any()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user