web: properly truncate long headers on message view

This commit is contained in:
Bill Thiede 2023-12-10 16:35:51 -08:00
parent f1b5e78962
commit d2cf270dda
2 changed files with 21 additions and 10 deletions

View File

@ -12,6 +12,14 @@
.message {
padding: 0.5em;*/
}
.message .headers {
width: 100%;
}
.message .headers .header {
overflow: clip;
text-overflow: ellipsis;
white-space: nowrap;
}
.body {
background: white;
color: black;

View File

@ -268,18 +268,21 @@ fn thread(thread: &ShowThreadQueryThread) -> Node<Msg> {
let messages = thread.messages.iter().map(|msg| {
div![
C!["message"],
div![
C!["headers"],
/* TODO(wathiede): collect all the tags and show them here. */
msg.from
.as_ref()
.map(|from| div![C!["header"], "From: ", view_address(&from)]),
msg.timestamp
.map(|ts| div![C!["header"], "Date: ", human_age(ts)]),
div!["Message-ID: ", &msg.id],
div![C!["header"], "Message-ID: ", &msg.id],
div![
C!["header"],
IF!(!msg.to.is_empty() => span!["To: ", view_addresses(&msg.to)]),
IF!(!msg.cc.is_empty() => span!["CC: ", view_addresses(&msg.cc)])
],
],
div![
C!["body"],
match &msg.body {