gioser-web: rebuild WASM with graph widget integration

- Fix missing reader declaration in spawn_local
- Rebuild pkg/ with wasm-bindgen 0.2.121
- Graph widget now appears below page content (SVG force-directed)
This commit is contained in:
Sergio
2026-05-23 14:57:13 +00:00
parent 7a53fea13c
commit 8235391add
5 changed files with 1055 additions and 1 deletions
+3 -1
View File
@@ -276,6 +276,7 @@ impl AppState {
let document_clone = self.document.clone();
let element_owned = element.to_string();
let url_owned = md_url.to_string();
let reader = fana_md_reader_web::Reader::new(content.clone());
wasm_bindgen_futures::spawn_local(async move {
let content_clone = content.clone();
if let Err(e) = reader.open_url(&url_owned, &element_owned).await {
@@ -318,7 +319,8 @@ impl AppState {
None, // callback simplificado por ahora
);
if let Err(e) = graph.load().await {
web_sys::console::warn_1(&format!("grafo: error al cargar: {:?}", e));
web_sys::console::warn_1(&format!("grafo: error al cargar: {:?}", e).into());
return;
}
});
}