pinakes-ui: integrate plugin pages into sidebar navigation; sanitize theme-extension CSS eval

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ie87e39c66253a7071f029d52dd5979716a6a6964
This commit is contained in:
raf 2026-03-11 21:27:42 +03:00
commit ba01acf271
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF

View file

@ -369,11 +369,13 @@ pub fn App() -> Element {
spawn(async move { spawn(async move {
let js: String = vars let js: String = vars
.iter() .iter()
.map(|(k, v)| { .filter_map(|(k, v)| {
format!( let k_js = serde_json::to_string(k).ok()?;
"document.documentElement.style.setProperty('{}','{}');", let v_js = serde_json::to_string(v).ok()?;
k, v Some(format!(
) "document.documentElement.style.setProperty({k_js},\
{v_js});"
))
}) })
.collect(); .collect();
let _ = document::eval(&js).await; 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}" }
}
}
}
} }
} }