web: tweak style and behavior of view original link
This commit is contained in:
parent
7d9376d607
commit
17ea2a35cb
@ -801,7 +801,10 @@ fn render_open_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Node<
|
|||||||
At::Href=>href,
|
At::Href=>href,
|
||||||
At::Target=>"_blank",
|
At::Target=>"_blank",
|
||||||
},
|
},
|
||||||
"View original"
|
"View original",
|
||||||
|
ev(Ev::Click, move |e| {
|
||||||
|
e.stop_propagation();
|
||||||
|
})
|
||||||
]]
|
]]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
@ -946,6 +949,8 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
|
|||||||
C!["text-right"],
|
C!["text-right"],
|
||||||
msg.timestamp
|
msg.timestamp
|
||||||
.map(|ts| div![C!["text-xs", "text-nowrap"], human_age(ts)]),
|
.map(|ts| div![C!["text-xs", "text-nowrap"], human_age(ts)]),
|
||||||
|
div![
|
||||||
|
C!["p-2"],
|
||||||
i![C![
|
i![C![
|
||||||
"mx-4",
|
"mx-4",
|
||||||
"read-status",
|
"read-status",
|
||||||
@ -959,7 +964,8 @@ fn render_closed_header(msg: &ShowThreadQueryThreadOnEmailThreadMessages) -> Nod
|
|||||||
ev(Ev::Click, move |e| {
|
ev(Ev::Click, move |e| {
|
||||||
e.stop_propagation();
|
e.stop_propagation();
|
||||||
Msg::SetUnread(id, !is_unread)
|
Msg::SetUnread(id, !is_unread)
|
||||||
}),
|
})
|
||||||
|
],
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -992,7 +998,7 @@ fn message_render(msg: &ShowThreadQueryThreadOnEmailThreadMessages, open: bool)
|
|||||||
],
|
],
|
||||||
IF!(open =>
|
IF!(open =>
|
||||||
div![
|
div![
|
||||||
C!["bg-white", "text-black", "p-4", "min-w-full", "w-0","overflow-x-auto", from],
|
C!["content", "bg-white", "text-black", "p-4", "min-w-full", "w-0","overflow-x-auto", from],
|
||||||
match &msg.body {
|
match &msg.body {
|
||||||
ShowThreadQueryThreadOnEmailThreadMessagesBody::UnhandledContentType(
|
ShowThreadQueryThreadOnEmailThreadMessagesBody::UnhandledContentType(
|
||||||
ShowThreadQueryThreadOnEmailThreadMessagesBodyOnUnhandledContentType { contents ,content_tree},
|
ShowThreadQueryThreadOnEmailThreadMessagesBodyOnUnhandledContentType { contents ,content_tree},
|
||||||
@ -1096,7 +1102,6 @@ fn render_attachements(
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: add cathup_mode:bool and hide elements when true
|
|
||||||
#[topo::nested]
|
#[topo::nested]
|
||||||
fn thread(
|
fn thread(
|
||||||
thread: &ShowThreadQueryThreadOnEmailThread,
|
thread: &ShowThreadQueryThreadOnEmailThread,
|
||||||
@ -1187,13 +1192,7 @@ fn thread(
|
|||||||
el_ref(content_el),
|
el_ref(content_el),
|
||||||
messages,
|
messages,
|
||||||
IF!(!catchup_mode => click_to_top())
|
IF!(!catchup_mode => click_to_top())
|
||||||
],
|
]
|
||||||
/* TODO(wathiede): plumb in orignal id
|
|
||||||
a![
|
|
||||||
attrs! {At::Href=>api::original(&thread_node.0.as_ref().expect("message missing").id)},
|
|
||||||
"Original"
|
|
||||||
],
|
|
||||||
*/
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,23 +2,23 @@ html {
|
|||||||
background-color: black;
|
background-color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mail-thread a,
|
.mail-thread .content a,
|
||||||
.news-post a {
|
.news-post a {
|
||||||
color: var(--color-link) !important;
|
color: var(--color-link) !important;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mail-thread br,
|
.mail-thread .content br,
|
||||||
.news-post br {
|
.news-post br {
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
content: " ";
|
content: " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
.mail-thread h1,
|
.mail-thread .content h1,
|
||||||
.mail-thread h2,
|
.mail-thread .content h2,
|
||||||
.mail-thread h3,
|
.mail-thread .content h3,
|
||||||
.mail-thread h4,
|
.mail-thread .content h4,
|
||||||
.news-post h1,
|
.news-post h1,
|
||||||
.news-post h2,
|
.news-post h2,
|
||||||
.news-post h3,
|
.news-post h3,
|
||||||
@ -27,12 +27,12 @@ html {
|
|||||||
margin-bottom: 1em !important;
|
margin-bottom: 1em !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mail-thread p,
|
.mail-thread .content p,
|
||||||
.news-post p {
|
.news-post p {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mail-thread pre,
|
.mail-thread .content pre,
|
||||||
.news-post pre {
|
.news-post pre {
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
background-color: #eee !important;
|
background-color: #eee !important;
|
||||||
@ -40,28 +40,28 @@ html {
|
|||||||
white-space: break-spaces;
|
white-space: break-spaces;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mail-thread code,
|
.mail-thread .content code,
|
||||||
.news-post code {
|
.news-post code {
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
white-space: break-spaces;
|
white-space: break-spaces;
|
||||||
background-color: #eee !important;
|
background-color: #eee !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mail-thread blockquote {
|
.mail-thread .content blockquote {
|
||||||
padding-left: 1em;
|
padding-left: 1em;
|
||||||
border-left: 2px solid #ddd;
|
border-left: 2px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mail-thread ol,
|
.mail-thread .content ol,
|
||||||
.mail-thread ul {
|
.mail-thread .content ul {
|
||||||
margin-left: 2em;
|
margin-left: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mail-thread .noreply-news-bloomberg-com a {
|
.mail-thread .content .noreply-news-bloomberg-com a {
|
||||||
background-color: initial !important;
|
background-color: initial !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mail-thread .noreply-news-bloomberg-com h2 {
|
.mail-thread .content .noreply-news-bloomberg-com h2 {
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user