Add loading completed status

This commit is contained in:
Spxg
2025-05-18 17:31:26 +08:00
parent 76dc7b8af4
commit 16196f0797

View File

@@ -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 {