web & server: implement handling for text and html bodies.

This commit is contained in:
2023-11-26 16:37:29 -08:00
parent 1cdabc348b
commit 11366b6fac
4 changed files with 204 additions and 7 deletions

View File

@@ -1054,15 +1054,20 @@ fn view_thread(thread: &ShowThreadQueryThread) -> Node<Msg> {
.map(|ts| div![C!["header"], "Date: ", human_age(ts)]),
IF!(!msg.to.is_empty() => div![C!["header"], "To: ", view_addresses(&msg.to)]),
IF!(!msg.cc.is_empty() => div![C!["header"], "CC: ", view_addresses(&msg.cc)]),
/*
div![
C!["body"],
match &message.body {
Some(body) => view_body(body.as_slice()),
None => div!["<no body>"],
},
C!["body"],
match &msg.body {
ShowThreadQueryThreadMessagesBody::UnhandledContentType(
ShowThreadQueryThreadMessagesBodyOnUnhandledContentType { contents },
) => div![C!["error"], contents],
ShowThreadQueryThreadMessagesBody::PlainText(
ShowThreadQueryThreadMessagesBodyOnPlainText { contents },
) => div![C!["view-part-text-plain"], contents],
ShowThreadQueryThreadMessagesBody::Html(
ShowThreadQueryThreadMessagesBodyOnHtml { contents },
) => div![C!["view-part-text-html"], raw![contents]],
}
],
*/
]
});
div![