fix(kiosk): add missing os_update import + guard Option<UCM>

1. ui.rs lacked `use crate::os_update` — module declared in main.rs
   but ui.rs couldn't resolve os_update::check/apply calls.
2. webkit6::WebView::user_content_manager() returns Option<UCM> not
   UCM directly — guard with if-let instead of calling method on Option.
This commit is contained in:
Mitchell R 2026-05-21 11:40:39 +02:00
parent a7d661ca42
commit 45c7ef26b2
No known key found for this signature in database

View file

@ -18,6 +18,7 @@ use crate::firmware;
use crate::gpio;
use crate::hwmon;
use crate::local_server;
use crate::os_update;
use crate::pipeline;
use crate::server;
use crate::ws_client;
@ -1634,7 +1635,7 @@ fn ensure_web(
// over page-author CSS.
{
use webkit6::prelude::*;
let ucm = wv.user_content_manager();
if let Some(ucm) = wv.user_content_manager() {
let style = webkit6::UserStyleSheet::new(
"*, *::before, *::after { cursor: none !important; }",
webkit6::UserContentInjectedFrames::AllFrames,
@ -1644,6 +1645,7 @@ fn ensure_web(
);
ucm.add_style_sheet(&style);
}
}
match source {
WebSource::Html(html) => {