Compare commits

..

2 Commits

Author SHA1 Message Date
74219ad333 web: fix uuid dep
All checks were successful
Continuous integration / Check (push) Successful in 1m49s
Continuous integration / Rustfmt (push) Successful in 34s
Continuous integration / build (push) Successful in 1m19s
Continuous integration / Test Suite (push) Successful in 4m17s
2025-02-10 17:28:04 -08:00
2073b7b132 Changes necessary for latest cargo packages 2025-02-10 14:57:40 -08:00
4 changed files with 7 additions and 27 deletions

3
Cargo.lock generated
View File

@ -2904,6 +2904,7 @@ dependencies = [
"serde_json",
"shared",
"thiserror 1.0.69",
"uuid",
"wasm-bindgen",
"wasm-bindgen-test",
"web-sys",
@ -6837,7 +6838,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ced87ca4be083373936a67f8de945faa23b6b42384bd5b64434850802c6dccd0"
dependencies = [
"getrandom 0.3.1",
"js-sys",
"serde",
"wasm-bindgen",
]
[[package]]

View File

@ -140,29 +140,6 @@ impl Transformer for StripHtml {
}
}
struct InlineRemoteStyle<'a> {
base_url: &'a Option<Url>,
}
#[async_trait]
impl<'a> Transformer for InlineRemoteStyle<'a> {
async fn transform(&self, _: &Option<Url>, html: &str) -> Result<String, TransformError> {
//info!("HTML:\n{html}");
Ok(
match CSSInliner::options()
.base_url(self.base_url.clone())
.build()
.inline(&html)
{
Ok(inlined_html) => inlined_html,
Err(err) => {
error!("failed to inline remote CSS: {err}");
html.to_string()
}
},
)
}
}
struct InlineStyle;
#[async_trait]

View File

@ -34,6 +34,9 @@ gloo-net = { version = "0.6.0", features = ["json", "serde_json"] }
human_format = "1.1.0"
build-info = "0.0.39"
wasm-bindgen = "0.2.95"
uuid = { version = "1.13.1", features = [
"js",
] } # direct dep to set js feature, prevents Rng issues
[package.metadata.wasm-pack.profile.release]
wasm-opt = ['-Os']

View File

@ -496,10 +496,7 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
}
Msg::MultiMsg(msgs) => msgs.into_iter().for_each(|msg| update(msg, model, orders)),
Msg::CopyToClipboard(text) => {
let clipboard = seed::window()
.navigator()
.clipboard()
.expect("couldn't get clipboard");
let clipboard = seed::window().navigator().clipboard();
orders.perform_cmd(async move {
wasm_bindgen_futures::JsFuture::from(clipboard.write_text(&text))
.await