From 45c7ef26b224f53e121a4dcade2232a0b4803adc Mon Sep 17 00:00:00 2001 From: Mitchell R Date: Thu, 21 May 2026 11:40:39 +0200 Subject: [PATCH] fix(kiosk): add missing os_update import + guard Option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 not UCM directly — guard with if-let instead of calling method on Option. --- kiosk/src/ui.rs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/kiosk/src/ui.rs b/kiosk/src/ui.rs index 4f0929f..08655ce 100644 --- a/kiosk/src/ui.rs +++ b/kiosk/src/ui.rs @@ -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,15 +1635,16 @@ fn ensure_web( // over page-author CSS. { use webkit6::prelude::*; - let ucm = wv.user_content_manager(); - let style = webkit6::UserStyleSheet::new( - "*, *::before, *::after { cursor: none !important; }", - webkit6::UserContentInjectedFrames::AllFrames, - webkit6::UserStyleLevel::User, - &[], - &[], - ); - ucm.add_style_sheet(&style); + if let Some(ucm) = wv.user_content_manager() { + let style = webkit6::UserStyleSheet::new( + "*, *::before, *::after { cursor: none !important; }", + webkit6::UserContentInjectedFrames::AllFrames, + webkit6::UserStyleLevel::User, + &[], + &[], + ); + ucm.add_style_sheet(&style); + } } match source {