diff --git a/crates/pinakes-ui/src/app.rs b/crates/pinakes-ui/src/app.rs index 11026b9..43699d2 100644 --- a/crates/pinakes-ui/src/app.rs +++ b/crates/pinakes-ui/src/app.rs @@ -369,11 +369,13 @@ pub fn App() -> Element { spawn(async move { let js: String = vars .iter() - .map(|(k, v)| { - format!( - "document.documentElement.style.setProperty('{}','{}');", - k, v - ) + .filter_map(|(k, v)| { + let k_js = serde_json::to_string(k).ok()?; + let v_js = serde_json::to_string(v).ok()?; + Some(format!( + "document.documentElement.style.setProperty({k_js},\ + {v_js});" + )) }) .collect(); let _ = document::eval(&js).await; @@ -849,17 +851,6 @@ pub fn App() -> Element { } } } - { - let sync_time_opt = plugin_registry - .read() - .last_refresh() - .map(|ts| ts.format("%H:%M").to_string()); - rsx! { - if let Some(sync_time) = sync_time_opt { - div { class: "nav-sync-time", "Synced {sync_time}" } - } - } - } } }