mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 19:06:34 +00:00
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:
parent
a7d661ca42
commit
45c7ef26b2
1 changed files with 11 additions and 9 deletions
|
|
@ -18,6 +18,7 @@ use crate::firmware;
|
||||||
use crate::gpio;
|
use crate::gpio;
|
||||||
use crate::hwmon;
|
use crate::hwmon;
|
||||||
use crate::local_server;
|
use crate::local_server;
|
||||||
|
use crate::os_update;
|
||||||
use crate::pipeline;
|
use crate::pipeline;
|
||||||
use crate::server;
|
use crate::server;
|
||||||
use crate::ws_client;
|
use crate::ws_client;
|
||||||
|
|
@ -1634,7 +1635,7 @@ fn ensure_web(
|
||||||
// over page-author CSS.
|
// over page-author CSS.
|
||||||
{
|
{
|
||||||
use webkit6::prelude::*;
|
use webkit6::prelude::*;
|
||||||
let ucm = wv.user_content_manager();
|
if let Some(ucm) = wv.user_content_manager() {
|
||||||
let style = webkit6::UserStyleSheet::new(
|
let style = webkit6::UserStyleSheet::new(
|
||||||
"*, *::before, *::after { cursor: none !important; }",
|
"*, *::before, *::after { cursor: none !important; }",
|
||||||
webkit6::UserContentInjectedFrames::AllFrames,
|
webkit6::UserContentInjectedFrames::AllFrames,
|
||||||
|
|
@ -1644,6 +1645,7 @@ fn ensure_web(
|
||||||
);
|
);
|
||||||
ucm.add_style_sheet(&style);
|
ucm.add_style_sheet(&style);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
match source {
|
match source {
|
||||||
WebSource::Html(html) => {
|
WebSource::Html(html) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue