Version bumps made css_inline uncompilable for wasm

This commit is contained in:
2023-12-05 14:12:15 -08:00
parent e34f2a1f39
commit f2347345b4
3 changed files with 34 additions and 446 deletions

View File

@@ -26,7 +26,6 @@ shared = {path = "../shared"}
itertools = "0.10.5"
serde_json = { version = "1.0.93", features = ["unbounded_depth"] }
wasm-timer = "0.2.5"
css-inline = "0.8.5"
chrono = "0.4.31"
graphql_client = "0.13.0"
thiserror = "1.0.50"

View File

@@ -194,13 +194,15 @@ fn view_part(part: &Part) -> Node<Msg> {
"text/plain" => view_text_plain(&part.content),
"text/html" => {
if let Some(Content::String(html)) = &part.content {
/* Build problems w/ css_inline. TODO(wathiede): move to server
let inliner = css_inline::CSSInliner::options()
.load_remote_stylesheets(false)
.remove_style_tags(true)
.build();
let inlined = inliner.inline(html).expect("failed to inline CSS");
*/
return div![C!["view-part-text-html"], raw![&inlined]];
return div![C!["view-part-text-html"], raw![&html]];
} else {
div![
C!["error"],
@@ -218,12 +220,14 @@ fn view_part(part: &Part) -> Node<Msg> {
for part in parts.iter().rev() {
if part.content_type == "text/html" {
if let Some(Content::String(html)) = &part.content {
/*
let inliner = css_inline::CSSInliner::options()
.load_remote_stylesheets(false)
.remove_style_tags(true)
.build();
let inlined = inliner.inline(html).expect("failed to inline CSS");
return div![Node::from_html(None, &inlined)];
*/
return div![Node::from_html(None, &html)];
}
}
if part.content_type == "text/plain" {